diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/install/install-functions | 20 | ||||
| -rwxr-xr-x | scripts/install/install-image-existing | 3 | ||||
| -rwxr-xr-x | scripts/install/install-image-new | 2 | ||||
| -rwxr-xr-x | scripts/system/vyatta_update_syslog.pl | 3 | ||||
| -rwxr-xr-x | scripts/vyatta-interfaces.pl | 4 |
5 files changed, 27 insertions, 5 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions index 0c2210fb..1929d1b3 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -285,7 +285,7 @@ is_union_install () return 1 fi if grep -q ' /live/image [^ ]\+ rw' /proc/mounts \ - && grep -q 'unionfs / unionfs ' /proc/mounts; then + && egrep -q '(union|overlay)fs / (union|overlay)fs ' /proc/mounts; then return 0 else return 1 @@ -328,6 +328,24 @@ get_new_version () # couldn't find it } +# Generate mount options based on the type of union mount +gen_mopts () +{ + local mnttype=$1 + local upper=$2 + local lower=$3 + local mntpoint=$4 + + case "$1" in + overlayfs) + echo "-t $mnttype -o noatime,upperdir=$upper,lowerdir=$lower $mnttype $mntpoint" + ;; + *) + echo "-t $mnttype -o noatime,dirs=$upper=rw:$lower=ro $mnttype $mntpoint" + ;; + esac +} + # try to mount. log any errors and return the appropriate status. # $1: arguments for mount try_mount () diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index 54881043..6df418ee 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -156,8 +156,7 @@ if ! try_mount "-o loop,ro $target_squash $READ_ROOT"; then fi # set up root for postinst -margs="-t unionfs -o noatime,dirs=$RW_DIR=rw:$READ_ROOT=ro unionfs" -margs="$margs $INST_ROOT" +margs=$(gen_mopts "overlayfs" $RW_DIR $READ_ROOT $INST_ROOT) if ! try_mount "$margs"; then rm -rf $REL_ROOT failure_exit 'Failed to set up root directory for postinst.' diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new index 3097392a..5c87c1ea 100755 --- a/scripts/install/install-image-new +++ b/scripts/install/install-image-new @@ -94,7 +94,7 @@ if ! try_mount "-o loop,ro -t squashfs $target_squash $READ_ROOT"; then echo 'Exiting...' exit 1 fi -margs="-t unionfs -o noatime,dirs=$rw_dir=rw:$READ_ROOT=ro unionfs $INST_ROOT" +margs=$(gen_mopts "overlayfs" $rw_dir $READ_ROOT $INST_ROOT) if ! try_mount "$margs"; then echo 'Exiting...' exit 1 diff --git a/scripts/system/vyatta_update_syslog.pl b/scripts/system/vyatta_update_syslog.pl index 3421d61a..7d12284e 100755 --- a/scripts/system/vyatta_update_syslog.pl +++ b/scripts/system/vyatta_update_syslog.pl @@ -65,6 +65,7 @@ sub get_target_param { my %facmap = ( 'all' => '*', 'protocols' => 'local7', + 'dataplane' => 'local6', ); # This builds a data structure that maps from target @@ -93,7 +94,7 @@ sub print_outchannel { # Force outchannel size to be 1k more than logrotate config to guarantee rotation $size = ($size + 5) * 1024; print $fh "\$outchannel $channel,$target,$size,/usr/sbin/logrotate ${LOGROTATE_CFG_DIR}/$channel\n"; - print $fh join( ';', @{ $entries{$target}{selector} } ), " \$$channel\n"; + print $fh join( ';', @{ $entries{$target}{selector} } ), " :omfile:\$$channel\n"; } my $config = new Vyatta::Config; diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index c455bb74..0ead1b17 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -471,6 +471,10 @@ sub set_speed_duplex { # read old values to avoid meaningless speed changes my ($autoneg, $ospeed, $oduplex) = get_ethtool($intf); + # some devices do not report settings + # assume these are 'auto' + return if ((! defined($ospeed)) && $nspeed eq 'auto'); + if (defined($autoneg) && $autoneg == 1) { # Device is already in autonegotiation mode return if ($nspeed eq 'auto'); |
