summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-01-26 23:07:38 +0100
committerDaniil Baturin <daniil@baturin.org>2019-01-26 23:07:38 +0100
commit3ab6b0fb427a225b3004022562f0dba37a456a64 (patch)
tree41898c6037a5b29061e39033a0489bf4d13e9970 /scripts
parentc8de959716ed7e32b47c24fe49a1f4785d4ecba1 (diff)
parent51cd34da47416003dda9ee2c10297a58cd2ed098 (diff)
downloadvyatta-cfg-system-3ab6b0fb427a225b3004022562f0dba37a456a64.tar.gz
vyatta-cfg-system-3ab6b0fb427a225b3004022562f0dba37a456a64.zip
Merge branch 'current' into crux
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/system/vyatta_update_console.pl2
-rw-r--r--scripts/system/vyatta_update_sysctl.pl7
-rwxr-xr-xscripts/vyatta-grub-setup1
-rwxr-xr-xscripts/vyatta-tunnel-cleanup10
4 files changed, 7 insertions, 13 deletions
diff --git a/scripts/system/vyatta_update_console.pl b/scripts/system/vyatta_update_console.pl
index ff7c2df1..79ad3617 100755
--- a/scripts/system/vyatta_update_console.pl
+++ b/scripts/system/vyatta_update_console.pl
@@ -102,6 +102,8 @@ sub update_getty{
system("systemctl daemon-reload");
if ( system("systemctl status serial-getty\@$tty.service 2>&1 > /dev/null")) {
system("systemctl start serial-getty\@$tty.service");
+ } else {
+ system("/bin/stty -F /dev/$tty $speed cstopb");
}
}
}
diff --git a/scripts/system/vyatta_update_sysctl.pl b/scripts/system/vyatta_update_sysctl.pl
index 6e33c5d0..adc84178 100644
--- a/scripts/system/vyatta_update_sysctl.pl
+++ b/scripts/system/vyatta_update_sysctl.pl
@@ -51,18 +51,19 @@ EOF
}
GetOptions(
- "option=s{2}" => \@opts,
+ "option=s{2,}" => \@opts,
) or usage();
set_sysctl_value(@opts) if (@opts);
exit 0;
sub set_sysctl_value {
- my ($sysctl_opt, $nvalue) = @_;
+ my ($sysctl_opt, @nvaluearr) = @_;
+ my $nvalue = join ' ',@nvaluearr;
my $ovalue = get_sysctl_value($sysctl_opt);
if ($nvalue ne $ovalue) {
- my $cmd = "$SYSCTL -w $sysctl_opt=$nvalue 2>&1> /dev/null";
+ my $cmd = "$SYSCTL -w $sysctl_opt=\"$nvalue\" 2>&1> /dev/null";
system($cmd);
if ($? >> 8) {
die "exec of $SYSCTL failed: '$cmd'";
diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup
index 995b5c8a..8f0734ed 100755
--- a/scripts/vyatta-grub-setup
+++ b/scripts/vyatta-grub-setup
@@ -154,6 +154,7 @@ fi
# set serial console options
echo -e "serial --unit=0 --speed=9600"
echo "terminal_output --append serial"
+ echo "terminal_input serial console"
# EFI needs a few extra modules
if [ -d /sys/firmware/efi ]; then
diff --git a/scripts/vyatta-tunnel-cleanup b/scripts/vyatta-tunnel-cleanup
index 979fb7bd..b8a93244 100755
--- a/scripts/vyatta-tunnel-cleanup
+++ b/scripts/vyatta-tunnel-cleanup
@@ -28,13 +28,3 @@ foreach my $tun ( $config->listEffectiveNodes() ) {
next if ($interface eq $tun); # don't count the one being deleted
$tunnel{$mode} = 1;
}
-
-foreach my $type ( keys %encapsulation ) {
- # skip if tunnel is still in use
- next if $tunnel{$type};
-
- my $module = $encapsulation{$type};
- next unless ( -d "/sys/module/$module" );
- system("sudo /sbin/rmmod $module") == 0
- or warn "rmmod $module failed\n";
-}