diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-07 15:08:50 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-07 15:08:50 -0800 |
commit | 9bd393471d4734a803755502fd36c7266354ad8d (patch) | |
tree | 56358317acc918c6e5da383e3a6021b993530655 | |
parent | 92b873bd7cddbdd355cff8fa9cbc9baf0496766a (diff) | |
download | vyatta-cfg-9bd393471d4734a803755502fd36c7266354ad8d.tar.gz vyatta-cfg-9bd393471d4734a803755502fd36c7266354ad8d.zip |
* support rc.local on persistent storage.
* start vyatta-ofr at S90.
-rw-r--r-- | debian/vyatta-cfg.postinst.in | 2 | ||||
-rwxr-xr-x | etc/init.d/vyatta-ofr | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/debian/vyatta-cfg.postinst.in b/debian/vyatta-cfg.postinst.in index 938c8f7..05daf3b 100644 --- a/debian/vyatta-cfg.postinst.in +++ b/debian/vyatta-cfg.postinst.in @@ -3,6 +3,6 @@ prefix=@prefix@ sysconfdir=@sysconfdir@ -update-rc.d vyatta-ofr defaults 99 >/dev/null +update-rc.d vyatta-ofr defaults 90 >/dev/null # do we want to start vyatta-ofr here in postinst? diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr index 5e5711a..96770f6 100755 --- a/etc/init.d/vyatta-ofr +++ b/etc/init.d/vyatta-ofr @@ -103,6 +103,19 @@ setup_configdir() { fi } +setup_rclocal () { + [ -f /etc/rc.local ] || touch /etc/rc.local + if [ -f ~root/vyatta/rc.local ]; then + mount -o bind ~root/vyatta/rc.local /etc/rc.local + elif [ -f /media/floppy/rc.local ]; then + mount -o bind /media/floppy/rc.local /etc/rc.local + fi +} + +restore_rclocal () { + umount /etc/rc.local >& /dev/null +} + # if necessary, provide initial config init_bootfile () { if [ ! -f $BOOTFILE ] ; then @@ -157,6 +170,7 @@ start () { log_daemon_msg "Starting Vyatta Router" setup_configdir + setup_rclocal mount_cfg_dir init_bootfile migrate_bootfile @@ -180,6 +194,7 @@ stop() let status\|=$? done unmount_cfg_dir + restore_rclocal log_end_msg $status } |