From e4cb6ceff6cff4878b0f3f6b1e4ea1094b10664c Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 12 Apr 2024 13:12:41 -0700 Subject: [PATCH] pbot-vm: simplify `network` script slightly --- applets/pbot-vm/guest/bin/network | 18 ++++++------------ lib/PBot/VERSION.pm | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/applets/pbot-vm/guest/bin/network b/applets/pbot-vm/guest/bin/network index f7645add..57ba343b 100755 --- a/applets/pbot-vm/guest/bin/network +++ b/applets/pbot-vm/guest/bin/network @@ -36,15 +36,6 @@ DisableNetwork() { } Main() { - case $1 in - on|off) ;; - *) - echo "Invalid command \`$1\`; usage: $Usage" - exit 1 ;; - esac - - Toggle="$1" - case $2 in iptables|ipt) Mode="iptables" ;; @@ -57,13 +48,16 @@ Main() { exit 1 ;; esac - case $Toggle in - "on") + case $1 in + on) echo "Enabling networking with $Mode" EnableNetwork "$Mode" ;; - "off") + off) echo "Disabling networking with $Mode" DisableNetwork "$Mode" ;; + *) + echo "Invalid command \`$1\`; usage: $Usage" + exit 1 ;; esac } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 18ea2bc9..cedd533a 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4748, + BUILD_REVISION => 4749, BUILD_DATE => "2024-04-12", };