diff options
| author | Bastian Bittorf <bittorf@bluebottle.com> | 2015-08-13 15:04:31 +0200 |
|---|---|---|
| committer | Bastian Bittorf <bittorf@bluebottle.com> | 2015-08-13 15:04:31 +0200 |
| commit | b5136c03037d2f75e548fa7065ed67d1c9937afd (patch) | |
| tree | 239e73c91327dfe9e14c6ecf640af7922dfa3244 | |
| parent | e3dfd595ebd9603f6cf9bfb504419b9c384d85b5 (diff) | |
| parent | 1fe6e873870c851af1ba2928df5e63ded067a52d (diff) | |
Merge pull request #129 from HRogge/for-12.09.x
OONF Init script fix for the case that /var/etc does not exist
| -rw-r--r-- | oonf-init-scripts/Makefile | 2 | ||||
| -rwxr-xr-x | oonf-init-scripts/files/oonf_init.sh | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/oonf-init-scripts/Makefile b/oonf-init-scripts/Makefile index fd1aa06..8bfbf6e 100644 --- a/oonf-init-scripts/Makefile +++ b/oonf-init-scripts/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=oonf-init-scripts -PKG_VERSION:=0.9.1-r2 +PKG_VERSION:=0.9.1-r3 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/oonf-init-scripts/files/oonf_init.sh b/oonf-init-scripts/files/oonf_init.sh index 1c7b414..8ab5b3b 100755 --- a/oonf-init-scripts/files/oonf_init.sh +++ b/oonf-init-scripts/files/oonf_init.sh @@ -42,7 +42,7 @@ oonf_add_devices_to_configuration() # olsrd2.@interface[2].ifname='wan lan wlanadhoc wlanadhocRADIO1' # /var is in ramdisc/tmpfs - uci export ${DAEMON} >"/var/etc/${DAEMON}_dev" + uci export ${DAEMON} >"/var/run/${DAEMON}_dev" while section="$( uci -q -c /etc/config get "${DAEMON}.@[${i}]" )"; do { echo "section: ${section}" @@ -55,7 +55,7 @@ oonf_add_devices_to_configuration() case "$( uci -q get "${DAEMON}.@[${i}].ignore" )" in 1|on|true|enabled|yes) oonf_log "removing/ignore section '$section'" - uci -q -c /var/etc delete "${DAEMON}_dev.@[${j}]" + uci -q -c /var/run delete "${DAEMON}_dev.@[${j}]" i=$(( i + 1 )) continue @@ -70,15 +70,15 @@ oonf_add_devices_to_configuration() if [ ! -z "${device_name}" ] then # add option 'name' for 'ifname' (e.g. 'mywifi') - uci -q -c /var/etc add_list "${DAEMON}_dev.@[${i}].name=${device_name}" + uci -q -c /var/run add_list "${DAEMON}_dev.@[${i}].name=${device_name}" fi } done i=$(( $i + 1 )) } done - uci -q -c /var/etc commit "${DAEMON}_dev" + uci -q -c /var/run commit "${DAEMON}_dev" - oonf_log "wrote '/var/etc/${DAEMON}_dev'" + oonf_log "wrote '/var/run/${DAEMON}_dev'" } oonf_reread_config() @@ -105,7 +105,7 @@ start() # produce coredumps ulimit -c unlimited - service_start /usr/sbin/${DAEMON} --set global.fork=true --load uci:///var/etc/${DAEMON}_dev + service_start /usr/sbin/${DAEMON} --set global.fork=true --load uci:///var/run/${DAEMON}_dev } stop() |
