diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-05-12 18:55:41 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-05-12 18:55:41 -0500 |
commit | 514125a2246ee477809a325a7661be08a15c8482 (patch) | |
tree | 304dace26fd27f14cc8f25347b2cab2cf95fdd8e | |
parent | 81731da16519e452ab2d4eb913ee01e5468a1905 (diff) | |
parent | 0a59c2f58a44f1caf4304429ace5d2d76d8867b8 (diff) | |
download | vyatta-cfg-system-514125a2246ee477809a325a7661be08a15c8482.tar.gz vyatta-cfg-system-514125a2246ee477809a325a7661be08a15c8482.zip |
Merge branch 'napa' of git.vyatta.com:/git/vyatta-cfg-system into napa
-rw-r--r-- | debian/changelog | 20 | ||||
-rw-r--r-- | debian/vyatta-cfg-system.postinst.in | 2 | ||||
-rwxr-xr-x | scripts/init-floppy | 29 | ||||
-rwxr-xr-x | scripts/install/install-functions | 11 | ||||
-rwxr-xr-x | scripts/install/install-image-existing | 6 | ||||
-rwxr-xr-x | scripts/install/install-image-new | 6 | ||||
-rwxr-xr-x | scripts/rl-system.init | 9 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.def | 8 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/mac/node.def | 5 | ||||
-rw-r--r-- | templates/interfaces/node.def | 1 | ||||
-rw-r--r-- | templates/service/node.def | 1 | ||||
-rw-r--r-- | templates/system/ipv6/blacklist/node.def | 1 | ||||
-rw-r--r-- | templates/system/ipv6/disable-forwarding/node.def | 1 | ||||
-rw-r--r-- | templates/system/ipv6/disable/node.def | 1 | ||||
-rw-r--r-- | templates/system/ipv6/neighbor/node.def | 1 | ||||
-rw-r--r-- | templates/system/ipv6/node.def | 1 | ||||
-rw-r--r-- | templates/system/node.def | 1 |
17 files changed, 73 insertions, 31 deletions
diff --git a/debian/changelog b/debian/changelog index 82c8bdb1..846e2712 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +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 + commands. + + -- Michael Larson <mike@vyatta.com> Tue, 10 May 2011 14:22:05 -0700 + +vyatta-cfg-system (0.19.71) unstable; urgency=low + + * changes for new commit + * more changes for new commit + + -- An-Cheng Huang <ancheng@vyatta.com> Tue, 10 May 2011 09:33:55 +0800 + vyatta-cfg-system (0.19.70) unstable; urgency=low * Support netxen NIC irq naming convention 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" diff --git a/scripts/install/install-functions b/scripts/install/install-functions index ffaea22d..5670f82a 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -96,9 +96,14 @@ get_response () { local ldefault=$(tolower "$1") local loptions=$(tolower "$2") - # get the response from the user - read myresponse - myresponse=$(tolower "$myresponse") + + if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ]; then + myresponse=$ldefault + else + # get the response from the user + read myresponse + myresponse=$(tolower "$myresponse") + fi # Check to see if the user accepts the default if [ -z "$myresponse" ]; then diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index 491f6499..13af9bf8 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -57,7 +57,11 @@ NEWVER=`dpkg -l --root=${CD_SQUASH_ROOT} | grep "^.. vyatta-version " | awk '{p NEWNAME=$NEWVER echo -n "What would you like to name this image? [$NEWNAME]: " -read response +if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ]; then + response=$NEWNAME +else + read response +fi if [ -n "$response" ]; then badchars=`echo $response | sed -e 's/[a-zA-Z0-9\.\_+-]//g'` if [ -n "$badchars" ]; then diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new index c669da8e..3097392a 100755 --- a/scripts/install/install-image-new +++ b/scripts/install/install-image-new @@ -31,7 +31,11 @@ if [ -z "$image_name" ]; then fi echo -n "What would you like to name this image? [$image_name]: " -read response +if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ]; then + response=$NEWNAME +else + read response +fi if [ -n "$response" ]; then badchars=`echo $response | sed -e 's/[a-zA-Z0-9\.\_+-]//g'` if [ -n "$badchars" ]; then diff --git a/scripts/rl-system.init b/scripts/rl-system.init index 115bbc7d..d6f974f7 100755 --- a/scripts/rl-system.init +++ b/scripts/rl-system.init @@ -27,7 +27,6 @@ source /etc/default/vyatta : ${vyatta_bindir:=${vyatta_prefix}/bin} : ${vyatta_sbindir:=${vyatta_prefix}/sbin} : ${vyatta_sysconfdir:=${vyatta_prefix}/etc} -: ${hostname:=`hostname -s`} [[ $PATH == *${vyatta_bindir}* ]] || PATH+=:${vyatta_bindir} [[ $PATH == *${vyatta_sbindir}* ]] || PATH+=:${vyatta_sbindir} @@ -40,14 +39,6 @@ export DEBIAN_FRONTEND=noninteractive ## BOOTFILE is provided by ofr.init : ${BOOTFILE:=$prefix/etc/config/config.boot} -if [ -z "$LOGFILE" ] ; then - if touch /var/log/messages &> /dev/null ; then - LOGFILE=/var/log/messages - else - LOGFILE=/dev/null - fi -fi - syslog () { logger -p user.warning -t "$progname" "$*" diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index 31883c64..0b55de8a 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -14,6 +14,14 @@ syntax:expression: exec \ fi" begin: rm -f /tmp/speed-duplex.$VAR(@) + if [ -d "/sys/class/net/$VAR(@)" ]; then + # assume hw-id always exists (as orig impl did) + s_mac="$VAR(hw-id/@)" + if [ -n "$VAR(mac/@)" ]; then + s_mac="$VAR(mac/@)" + fi + /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) --set-mac $s_mac + fi create: ip link set "$VAR(@)" up /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on diff --git a/templates/interfaces/ethernet/node.tag/mac/node.def b/templates/interfaces/ethernet/node.tag/mac/node.def index c9fbb0fe..5b797830 100644 --- a/templates/interfaces/ethernet/node.tag/mac/node.def +++ b/templates/interfaces/ethernet/node.tag/mac/node.def @@ -1,9 +1,4 @@ type: macaddr -priority: 317 # must be set before dhcp client help: Media Access Control (MAC) address syntax:expression: exec "\ /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --valid-mac $VAR(@)" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(@) -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(../hw-id/@) - diff --git a/templates/interfaces/node.def b/templates/interfaces/node.def index ee75b174..e4192f96 100644 --- a/templates/interfaces/node.def +++ b/templates/interfaces/node.def @@ -1,2 +1 @@ -priority: 850 help: Network interfaces diff --git a/templates/service/node.def b/templates/service/node.def index c88bc349..0682c74c 100644 --- a/templates/service/node.def +++ b/templates/service/node.def @@ -1,2 +1 @@ -priority: 900 help: Services diff --git a/templates/system/ipv6/blacklist/node.def b/templates/system/ipv6/blacklist/node.def index ce8dafd1..081425bd 100644 --- a/templates/system/ipv6/blacklist/node.def +++ b/templates/system/ipv6/blacklist/node.def @@ -1,3 +1,4 @@ +priority: 400 help: Prevent the IPv6 kernel module from being loaded create: diff --git a/templates/system/ipv6/disable-forwarding/node.def b/templates/system/ipv6/disable-forwarding/node.def index 4d374455..10357338 100644 --- a/templates/system/ipv6/disable-forwarding/node.def +++ b/templates/system/ipv6/disable-forwarding/node.def @@ -1,3 +1,4 @@ +priority: 400 help: Disable IPv6 forwarding on all interfaces # Disable IPv6 forwarding for all interfaces we currently have, diff --git a/templates/system/ipv6/disable/node.def b/templates/system/ipv6/disable/node.def index be1ce2f5..eb61557f 100644 --- a/templates/system/ipv6/disable/node.def +++ b/templates/system/ipv6/disable/node.def @@ -1,3 +1,4 @@ +priority: 400 help: Disable assignment of IPv6 addresses on all interfaces create: diff --git a/templates/system/ipv6/neighbor/node.def b/templates/system/ipv6/neighbor/node.def index ed434588..ca609636 100644 --- a/templates/system/ipv6/neighbor/node.def +++ b/templates/system/ipv6/neighbor/node.def @@ -1 +1,2 @@ +priority: 400 help: Parameters for Neighbor cache diff --git a/templates/system/ipv6/node.def b/templates/system/ipv6/node.def index 4801c82d..d67a124a 100644 --- a/templates/system/ipv6/node.def +++ b/templates/system/ipv6/node.def @@ -1,2 +1 @@ -priority: 400 help: IPv6 settings diff --git a/templates/system/node.def b/templates/system/node.def index 156b6317..5a6953a7 100644 --- a/templates/system/node.def +++ b/templates/system/node.def @@ -1,2 +1 @@ -priority: 405 help: System parameters |