diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-05-12 14:34:41 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-05-12 14:34:41 -0700 |
commit | f520b5629b26570e6e8bb7f9f05714308bd25d9e (patch) | |
tree | 976b58a57cbdf1a1e6c697329060422bfda35006 | |
parent | 027071f891316b3c9dd2aa5dec2f119b5ffbd158 (diff) | |
parent | 7d02fa70ca8207ebd6111827691735cd9d980c30 (diff) | |
download | vyatta-cfg-system-f520b5629b26570e6e8bb7f9f05714308bd25d9e.tar.gz vyatta-cfg-system-f520b5629b26570e6e8bb7f9f05714308bd25d9e.zip |
Merge branch 'larkspur' of vm:git/vyatta-cfg-system into larkspur
-rwxr-xr-x | scripts/install-system | 27 | ||||
-rw-r--r-- | templates/service/snmp/community/node.tag/client/node.def | 2 | ||||
-rw-r--r-- | templates/service/snmp/community/node.tag/network/node.def | 2 | ||||
-rw-r--r-- | templates/service/snmp/trap-source/node.def | 2 | ||||
-rw-r--r-- | templates/service/snmp/trap-target/node.def | 2 |
5 files changed, 26 insertions, 9 deletions
diff --git a/scripts/install-system b/scripts/install-system index 06deb0a3..4f92ca37 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -890,6 +890,23 @@ create_partitions() { fi } +# Copy directory with pretty progress bar +copy_filesystem() { + cp -r -v --preserve=all "$@" | awk '{ + ++files + if ((files % 10) == 0) { + percent = files / total_files * 100 + printf "%3d%% [", percent + for (i=0;i<percent; i+=2) + printf "=" + printf ">" + for (;i<100;i+=2) + printf " " + printf "]\r" + } + }' total_files=$(find "$@" | wc -l) +} + # Install the root filesystem # $1 is the partition to install on install_root_filesystem () { @@ -914,8 +931,7 @@ install_root_filesystem () { fi if [ -z $UNION ]; then - echo -n "Copying system image files to /dev/$ROOT_PARTITION: " - progress_indicator start + echo "Copying system files to /dev/$ROOT_PARTITION: " # Mount the squashfs for copying output=$(mkdir -p /mnt/squashfs) if [ -f /live/image/live/filesystem.squashfs ]; then @@ -936,12 +952,13 @@ install_root_filesystem () { exit 1 fi - output=$(cp --preserve=all -R /mnt/squashfs/* $rootfsdir/) + echo "Copying /mnt/squashfs/* to $rootfsddir" >>$INSTALL_LOG + copy_filesystem /mnt/squashfs/* $rootfsdir 2>>$INSTALL_LOG status=$? - + echo + if [ "$status" != 0 ]; then echo -e "Error trying to copy the rootfs.\nPlease see install log for more details.\nExiting..." - echo -e "Error trying to copy the rootfs.\ncp -pR /mnt/squashfs/* $rootfsdir/\n$output" >> $INSTALL_LOG exit 1 fi diff --git a/templates/service/snmp/community/node.tag/client/node.def b/templates/service/snmp/community/node.tag/client/node.def index 828faa97..427a9939 100644 --- a/templates/service/snmp/community/node.tag/client/node.def +++ b/templates/service/snmp/community/node.tag/client/node.def @@ -1,3 +1,3 @@ multi: -type: ipv4 +type: ipv4,ipv6 help: Set IP address of SNMP client allowed to contact system diff --git a/templates/service/snmp/community/node.tag/network/node.def b/templates/service/snmp/community/node.tag/network/node.def index 00a77d4b..4b80a51b 100644 --- a/templates/service/snmp/community/node.tag/network/node.def +++ b/templates/service/snmp/community/node.tag/network/node.def @@ -1,4 +1,4 @@ multi: -type: ipv4net +type: ipv4net,ipv6net help: Set subnet of SNMP client(s) allowed to contact system syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" diff --git a/templates/service/snmp/trap-source/node.def b/templates/service/snmp/trap-source/node.def index d8add72c..61a8cd6a 100644 --- a/templates/service/snmp/trap-source/node.def +++ b/templates/service/snmp/trap-source/node.def @@ -1,2 +1,2 @@ -type: ipv4 +type: ipv4,ipv6 help: Set SNMP trap source address diff --git a/templates/service/snmp/trap-target/node.def b/templates/service/snmp/trap-target/node.def index 493484b7..cb13f1d6 100644 --- a/templates/service/snmp/trap-target/node.def +++ b/templates/service/snmp/trap-target/node.def @@ -1,3 +1,3 @@ tag: -type: ipv4 +type: ipv4,ipv6 help: Set IP address of trap target |