From 10f3f434fad4c9b4cb188cda041caabb8e1ae345 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 11 Dec 2005 22:11:57 +0000 Subject: [PATCH] only commit nvram if necessary (fixes #74) SVN-Revision: 2623 --- openwrt/package/webif/files/usr/lib/webif/apply.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openwrt/package/webif/files/usr/lib/webif/apply.sh b/openwrt/package/webif/files/usr/lib/webif/apply.sh index fdcb4c324a..8cafa4fa92 100644 --- a/openwrt/package/webif/files/usr/lib/webif/apply.sh +++ b/openwrt/package/webif/files/usr/lib/webif/apply.sh @@ -56,10 +56,12 @@ done # config-* simple config files [ -f /etc/nvram.overrides ] && ( # White Russian cd /proc/self - cat /tmp/.webif/config-* 2>&- | tee fd/1 | xargs -n1 nvram set + cat /tmp/.webif/config-* 2>&- | grep '=' >&- 2>&- && { + cat /tmp/.webif/config-* 2>&- | tee fd/1 | xargs -n1 nvram set + echo "Committing NVRAM ..." + nvram commit + } ) -echo "Committing NVRAM ..." -nvram commit for config in $(ls config-* 2>&-); do name=${config#config-} eval 'case "$name" in -- 2.30.2