diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-05-12 13:58:15 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2011-05-12 13:58:15 -0700 |
commit | 0a59c2f58a44f1caf4304429ace5d2d76d8867b8 (patch) | |
tree | 1675b4cd514059ed799780784677d0c02d478b8c | |
parent | a00c48447392f8ce7902b6c2f99269cf56340eea (diff) | |
parent | f7c81d376f3f781171f088c9c5734f2e4a80a9b9 (diff) | |
download | vyatta-cfg-quagga-0a59c2f58a44f1caf4304429ace5d2d76d8867b8.tar.gz vyatta-cfg-quagga-0a59c2f58a44f1caf4304429ace5d2d76d8867b8.zip |
Merge branch 'napa' of suva.vyatta.com:/git/vyatta-cfg-system into napa
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/vyatta-cfg-system.postinst.in | 2 | ||||
-rwxr-xr-x | scripts/init-floppy | 29 |
3 files changed, 29 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index ba4422ad..846e2712 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.19.73) unstable; urgency=low + + * Fix Bug 7012 make /config available with init-floppy + + -- Mohit Mehta <mohit@vyatta.com> Wed, 11 May 2011 11:33:15 -0700 + vyatta-cfg-system (0.19.72) unstable; urgency=low * support interactive mode for rest api for install image op mode diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index d9663245..177dee6d 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -193,7 +193,7 @@ then # Do not remove the following call to vyatta-postconfig-bootup.script. # Any boot time workarounds should be put in script below so that they # get preserved for the new image during image upgrade. -/opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script +sudo /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script EOF sh -c "sed -i -e '/exit 0/d' /etc/rc.local" cat <<EOF >>/etc/rc.local diff --git a/scripts/init-floppy b/scripts/init-floppy index 16e12915..9f5301d8 100755 --- a/scripts/init-floppy +++ b/scripts/init-floppy @@ -64,7 +64,7 @@ config_notice="\rSaving config... \c" config__error="\rError: Couldn't save config in $fd/config/config.boot" bind___notice="\rRedirecting config directory...\c" bind____error="\rError: redirect to floppy" -saved__notice="\rYour configuration was saved in: $fd/config/config.boot" +saved__notice="\rYour configuration directory was saved to: $fd/config" mkdir -p $fd @@ -92,16 +92,31 @@ echo "$mount__notice" /bin/mount /dev/fd0 $fd -t ext2 -o sync,noatime,noexec,nosuid,nodev &>/dev/null || \ failure "$mount___error" -/bin/mkdir $fd/config -/bin/chmod 777 $fd/config - -echo "$config_notice" -${vyatta_sbindir}/vyatta-save-config.pl $fd/config/config.boot &>/dev/null || \ - failure "$config__error" +# +# Check to make sure we have enough space to copy the config dir +# +fd_space_avail=`df -k $fd | tail -1 | awk '{ print $4 }'` +space_needed=`du -s ${vyatta_sysconfdir}/config | awk '{ print $1 }'` + +if [ $fd_space_avail -gt $space_needed ]; then + echo "$config_notice" + /bin/mkdir $fd/config + /usr/bin/find ${vyatta_sysconfdir}/config -maxdepth 1 -mindepth 1 \ + -exec /bin/cp '-a' '{}' "$fd/config" ';' + /bin/chgrp -R vyattacfg $fd/config + /bin/chmod -R 775 $fd/config +else + echo 'Not enough space to save current configuration directory' + failure "$config__error" +fi echo "$bind___notice" /bin/mount -o bind $fd/config ${vyatta_sysconfdir}/config &>/dev/null || \ failure "$bind____error" +# also, bind mount config directory to /config +/bin/mkdir -p /config +/bin/mount -o bind $fd/config /config &>/dev/null || \ + failure "$bind____error" echo "$saved__notice" |