Skip to content

Commit 4788441

Browse files
committed
inserted autocfg init file
1 parent 4a02bdf commit 4788441

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

files/etc/init.d/autocfg

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh /etc/rc.common
2+
3+
START=80
4+
NAME=autocfg
5+
EXTRA_COMMANDS="reset"
6+
EXTRA_HELP="reset Removes all config files on the usb stick and recreates them"
7+
8+
work_folder=/opt/autocfg
9+
10+
start() {
11+
12+
$work_folder/bin/auto_config.sh >> /mnt/usb/apply_config.log
13+
local change_rc=$?
14+
15+
if [ "$change_rc" == "0"] ; then
16+
echo "Changes by auto-config" >> /mnt/usb/apply_config.log
17+
echo "Initiates reboot" >> /mnt/usb/apply_config.log
18+
reboot
19+
fi
20+
21+
}
22+
23+
reset () {
24+
. $work_folder/conf/auto.config.sh
25+
rm $cfg_auto_folder/*
26+
27+
$work_folder/bin/auto_config.sh
28+
}
29+
30+
stop() {
31+
}

0 commit comments

Comments
 (0)