commit 7d79722818fcad600b499038b60d653c40fba51c
parent f0038be4789dcce58804a029e56af08bd2e0e6df
Author: hhvn <dev@hhvn.uk>
Date: Fri, 22 Apr 2022 14:22:50 +0100
Fix ip prompt for autoconf-bond
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.scripts/net/autoconf-bond b/.scripts/net/autoconf-bond
@@ -20,6 +20,11 @@ lanmask = $lanmask(1)
mode = $mode(1)
miimon = $miimon(1)
+# Include it in /etc/ip.rc to avoid being prompted
+if (~ $ip ()) {
+ printf 'Ip: '
+ ip = `$nl{head -n 1}
+}
if (~ $gateway ())
gateway = 192.168.1.1
if (~ $lanmask ())
@@ -29,8 +34,6 @@ if (~ $mode ())
if (~ $miimon ())
miimon = 100
-fn needip { if (~ $ip ()) { printf 'Ip: '; ip = `$nl{head -n 1} } }
-
printf 'Checking if module ''bonding'' is loaded...\n'
if (~ `{lsmod | awk '$1 == "bonding"'} ()) {
printf 'Loading module ''bonding''...'