From e19c9e6bc23715e6760f000a27514ece070a80cc Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 7 Oct 2023 10:24:56 +0200 Subject: [PATCH 01/14] scripts dutchification - batch 2 --- etc/rc.d/rc.udev | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/rc.d/rc.udev b/etc/rc.d/rc.udev index c21af4d1b..b89756fd2 100755 --- a/etc/rc.d/rc.udev +++ b/etc/rc.d/rc.udev @@ -107,10 +107,10 @@ case "$1" in cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null # Add any locally defined additional device nodes: cp --preserve=all --recursive --update /etc/udev/devices/* /dev 2>/dev/null - log "Starting udevd: /sbin/udevd --daemon" + log "Starting udevd..." run udevd --daemon # Since udev is just now being started we want to use add events: - log "Triggering udev events: /sbin/udevadm trigger --action=add" + log "Triggering udev events..." # Call udevtrigger and udevsettle to do the device configuration: run udevadm trigger --type=subsystems --action=add run udevadm trigger --type=devices --action=add @@ -141,7 +141,7 @@ case "$1" in NEW=$(grep -Po $MAC $RAM | sort) # Bergware - set persistent rules of existing interfaces grep -B2 "$NEW" $ROM | /usr/bin/fromdos >$RAM - udevadm control --reload + run udevadm control --reload # Bergware - find the unique drivers currently in use by the interface(s) DRIVERS= for PORT in $(ls --indicator-style=none /sys/class/net | grep -P '^eth\d+$'); do @@ -166,15 +166,15 @@ case "$1" in # Update the hardware database index (/etc/udev/hwdb.bin), if possible: if touch /etc/udev/testfile 2>/dev/null; then rm -f /etc/udev/testfile - log "Updating hardware database index: udevadm hwdb --update" + log "Updating hardware database index..." run udevadm hwdb --update fi # Since udevd is running, most of the time we only need change events: - log "Triggering udev events: udevadm trigger --action=change" + log "Triggering udev events..." run udevadm trigger --type=subsystems --action=change run udevadm trigger --type=devices --action=change fi - udevadm settle --timeout=120 + run udevadm settle --timeout=120 ;; 'stop') log "Stopping udevd is STRONGLY discouraged and not supported." From 15dd359787420e69656d035a03b62ffb9da44d26 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 7 Oct 2023 10:36:36 +0200 Subject: [PATCH 02/14] rc.inet1: added interface carrier check for DHCP polling --- etc/rc.d/rc.inet1 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index af848065b..0d8c9e4fd 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -62,6 +62,9 @@ # - added error logging to syslog # - replace logging for generic add-in module +# Adapted by Bergware for use in Unraid OS - August 2023 +# - added interface carrier check when polling for DHCP server + # Bergware - modified for Unraid OS, October 2023 ########### @@ -347,10 +350,17 @@ ipaddr_up(){ [[ $IP == ipv4 ]] && DHCP_OPTIONS="$DHCP_OPTIONS -4" [[ $IP == ipv6 ]] && DHCP_OPTIONS="$DHCP_OPTIONS -6" [[ $IP != ipv4 && -n $PRIV6 && -d $CONF6/$IFACE ]] && echo $PRIV6 >$CONF6/$IFACE/use_tempaddr - log "polling up to 60 sec for DHCP server on interface $IFACE" - if ! run timeout 60 dhcpcd -w $DHCP_OPTIONS $IFACE; then - log "can't obtain IP address, continue polling in background on interface $IFACE" + if [[ $(cat $SYSTEM/$IFACE/carrier 2>/dev/null) == 0 ]]; then + # interface is DOWN + log "interface is DOWN, polling DHCP server in background on interface $IFACE" run dhcpcd -b $DHCP_OPTIONS $IFACE + else + # interface is UP + log "interface is UP, polling up to 60 sec for DHCP server on interface $IFACE" + if ! run timeout 60 dhcpcd -w $DHCP_OPTIONS $IFACE; then + log "can't obtain IP address, continue polling in background on interface $IFACE" + run dhcpcd -b $DHCP_OPTIONS $IFACE + fi fi [[ $j -eq $((${VLANS[$i]}-1)) ]] && sleep 3 elif [[ $DHCP == no ]]; then From 7aeb04936d95311983c6c94a4170e04a47e5b7df Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 7 Oct 2023 10:45:29 +0200 Subject: [PATCH 03/14] rc.inet1: added interface carrier check for DHCP polling --- etc/rc.d/rc.inet1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index 0d8c9e4fd..a3147bcb2 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -352,11 +352,11 @@ ipaddr_up(){ [[ $IP != ipv4 && -n $PRIV6 && -d $CONF6/$IFACE ]] && echo $PRIV6 >$CONF6/$IFACE/use_tempaddr if [[ $(cat $SYSTEM/$IFACE/carrier 2>/dev/null) == 0 ]]; then # interface is DOWN - log "interface is DOWN, polling DHCP server in background on interface $IFACE" + log "interface is DOWN, polling DHCP $IP server in background on interface $IFACE" run dhcpcd -b $DHCP_OPTIONS $IFACE else # interface is UP - log "interface is UP, polling up to 60 sec for DHCP server on interface $IFACE" + log "interface is UP, polling up to 60 sec for DHCP $IP server on interface $IFACE" if ! run timeout 60 dhcpcd -w $DHCP_OPTIONS $IFACE; then log "can't obtain IP address, continue polling in background on interface $IFACE" run dhcpcd -b $DHCP_OPTIONS $IFACE From 3f197fc96b1cd70c9f55473a410375eccf0faca5 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 7 Oct 2023 10:50:11 +0200 Subject: [PATCH 04/14] rc.inet1: added interface carrier check for DHCP polling --- etc/rc.d/rc.inet1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index a3147bcb2..1674b19d0 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -352,11 +352,11 @@ ipaddr_up(){ [[ $IP != ipv4 && -n $PRIV6 && -d $CONF6/$IFACE ]] && echo $PRIV6 >$CONF6/$IFACE/use_tempaddr if [[ $(cat $SYSTEM/$IFACE/carrier 2>/dev/null) == 0 ]]; then # interface is DOWN - log "interface is DOWN, polling DHCP $IP server in background on interface $IFACE" + log "interface $IFACE is DOWN, polling DHCP $IP server in background" run dhcpcd -b $DHCP_OPTIONS $IFACE else # interface is UP - log "interface is UP, polling up to 60 sec for DHCP $IP server on interface $IFACE" + log "interface $IFACE is UP, polling up to 60 sec for DHCP $IP server" if ! run timeout 60 dhcpcd -w $DHCP_OPTIONS $IFACE; then log "can't obtain IP address, continue polling in background on interface $IFACE" run dhcpcd -b $DHCP_OPTIONS $IFACE From b630ddf2e8b9c786b7db861aaa48c28db430fed5 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 7 Oct 2023 14:50:55 +0200 Subject: [PATCH 05/14] network settings: fix when updating description only --- emhttp/plugins/dynamix/Eth0.page | 51 +++++++++++------------- emhttp/plugins/dynamix/scripts/netconfig | 8 ++-- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/emhttp/plugins/dynamix/Eth0.page b/emhttp/plugins/dynamix/Eth0.page index f7e197681..ed54cfc88 100644 --- a/emhttp/plugins/dynamix/Eth0.page +++ b/emhttp/plugins/dynamix/Eth0.page @@ -92,9 +92,31 @@ refresh(); // automatically include new ethernet ports Array.prototype.same = function(){return this.sort().filter(function(v,i,o){return i&&v===o[i-1]?v:0;}).length;} function prepareSettings(form) { - var metrics = []; - var metrics6 = []; + var bondnics = [], brnics = []; + for (var i=0,nic; nic=form.BONDNICS.options[i]; i++) { + if (nic.selected) { + bondnics.push(nic.value); + nic.selected = false; + } + } + nic = form.BONDNICS.options[0]; + nic.value = bondnics.join(','); + nic.selected = true; + nic.disabled = false; + for (var i=0,nic; nic=form.BRNICS.options[i]; i++) { + if (nic.selected) { + brnics.push(nic.value); + nic.selected = false; + } + } + nic = form.BRNICS.options[0]; + nic.value = form.BONDING.value=='yes' ? form.BONDNAME.value : brnics.join(','); + nic.selected = true; + nic.disabled = false; + if (brnics.length>1) form.BRSTP.value = 'yes'; if ($(form).find('input[name="#arg[1]"]').val()=='none') return true; + + var metrics = [], metrics6 = []; $(form).find('input[name^="METRIC:"]').each(function(){if($(this).val()>0) metrics.push($(this).val());}); $(form).find('input[name^="METRIC6:"]').each(function(){if($(this).val()>0) metrics6.push($(this).val());}); if (metrics.same() || metrics6.same()) { @@ -123,31 +145,6 @@ function prepareSettings(form) { return false; } } - var member = ''; - for (var i=0,item; item=form.BONDNICS.options[i]; i++) { - if (item.selected) { - if (member.length) member += ','; - member += item.value; - item.selected = false; - } - } - item = form.BONDNICS.options[0]; - item.value = member; - item.selected = true; - item.disabled = false; - var member = ''; - for (var i=0,item; item=form.BRNICS.options[i]; i++) { - if (item.selected) { - if (member.length) member += ','; - member += item.value; - item.selected = false; - } - } - item = form.BRNICS.options[0]; - item.value = form.BONDING.value=='yes' ? form.BONDNAME.value : member; - item.selected = true; - item.disabled = false; - if (member.indexOf(',')>0) form.BRSTP.value = 'yes'; $(form).find('select[name^="PROTOCOL:"]').each(function() { var protocol = $(this).val() || 'ipv4'; var i = $(this).attr('name').split(':')[1]; diff --git a/emhttp/plugins/dynamix/scripts/netconfig b/emhttp/plugins/dynamix/scripts/netconfig index a38baeda7..40d9f040f 100755 --- a/emhttp/plugins/dynamix/scripts/netconfig +++ b/emhttp/plugins/dynamix/scripts/netconfig @@ -17,6 +17,8 @@ $run = $set != 'none'; $ini = parse_ini_file('/var/local/emhttp/network.ini',true); ksort($ini,SORT_NATURAL); $cfg = '/boot/config/network.cfg'; +file_put_contents('/tmp/ini',print_r($ini,true)); + function update_wireguard($ifname) { if (!in_array($ifname,['br0','bond0','eth0'])) return; $nic = file_exists('/sys/class/net/br0') ? 'br0' : (file_exists('/sys/class/net/bond0') ? 'bond0' : 'eth0'); @@ -81,7 +83,7 @@ if ($run) { } // create configuration file for all available interfaces -$i = 0; $new = []; $new[] = "# Generated settings:"; +$i = 0; $new = ["# Generated settings:"]; foreach ($ini as $name => $port) { $bonding = $port['BONDING']=='yes'; $bridging = $port['BRIDGING']=='yes'; @@ -126,8 +128,8 @@ file_put_contents($cfg,implode("\r\n",$new)."\r\n"); // start interface with updated (new) configuration // don't execute when only interface description has changed if ($run) { - exec("/etc/rc.d/rc.inet1 {$ifname}_start >/dev/null 2>&1"); - exec("/usr/local/sbin/create_network_ini $ifname >/dev/null 2>&1 &"); + exec("/etc/rc.d/rc.inet1 {$ifname}_start &>/dev/null"); + exec("/usr/local/sbin/create_network_ini $ifname &>/dev/null &"); update_wireguard($ifname); } exit(0); From 61247972c0412331a9dbc77355a7c719da80e7b3 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 7 Oct 2023 15:17:41 +0200 Subject: [PATCH 06/14] network settings: fix when updating description only --- emhttp/plugins/dynamix/scripts/netconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/emhttp/plugins/dynamix/scripts/netconfig b/emhttp/plugins/dynamix/scripts/netconfig index 40d9f040f..0621a9c97 100755 --- a/emhttp/plugins/dynamix/scripts/netconfig +++ b/emhttp/plugins/dynamix/scripts/netconfig @@ -17,8 +17,6 @@ $run = $set != 'none'; $ini = parse_ini_file('/var/local/emhttp/network.ini',true); ksort($ini,SORT_NATURAL); $cfg = '/boot/config/network.cfg'; -file_put_contents('/tmp/ini',print_r($ini,true)); - function update_wireguard($ifname) { if (!in_array($ifname,['br0','bond0','eth0'])) return; $nic = file_exists('/sys/class/net/br0') ? 'br0' : (file_exists('/sys/class/net/bond0') ? 'bond0' : 'eth0'); From c91386cca0db72ec90c56466f008a822866a3734 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 7 Oct 2023 19:47:06 +0200 Subject: [PATCH 07/14] rc.inet1: added interface carrier check for DHCP polling --- etc/rc.d/rc.inet1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index 1674b19d0..b22ba2714 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -350,17 +350,17 @@ ipaddr_up(){ [[ $IP == ipv4 ]] && DHCP_OPTIONS="$DHCP_OPTIONS -4" [[ $IP == ipv6 ]] && DHCP_OPTIONS="$DHCP_OPTIONS -6" [[ $IP != ipv4 && -n $PRIV6 && -d $CONF6/$IFACE ]] && echo $PRIV6 >$CONF6/$IFACE/use_tempaddr - if [[ $(cat $SYSTEM/$IFACE/carrier 2>/dev/null) == 0 ]]; then - # interface is DOWN - log "interface $IFACE is DOWN, polling DHCP $IP server in background" - run dhcpcd -b $DHCP_OPTIONS $IFACE - else + if [[ $(cat $SYSTEM/$IFACE/carrier 2>/dev/null) == 1 ]]; then # interface is UP log "interface $IFACE is UP, polling up to 60 sec for DHCP $IP server" if ! run timeout 60 dhcpcd -w $DHCP_OPTIONS $IFACE; then log "can't obtain IP address, continue polling in background on interface $IFACE" run dhcpcd -b $DHCP_OPTIONS $IFACE fi + else + # interface is DOWN + log "interface $IFACE is DOWN, polling DHCP $IP server in background" + run dhcpcd -b $DHCP_OPTIONS $IFACE fi [[ $j -eq $((${VLANS[$i]}-1)) ]] && sleep 3 elif [[ $DHCP == no ]]; then From dd0dc1ff12ac30ae875a73e797a49cb0b09b7db7 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 8 Oct 2023 08:48:00 +0200 Subject: [PATCH 08/14] scripts dutchification - batch 1 --- etc/rc.d/rc.inet1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index b22ba2714..5a01453d9 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -152,6 +152,14 @@ set_mtu(){ fi } +# function to wait for carrier of interface +carrier_up(){ + for i in {1..5}; do + [[ $(cat $SYSTEM/$1/carrier 2>/dev/null) == 1 ]] && return 0 || sleep 1 + done + return 1 +} + # function to create bond interface bond_up(){ [[ -d /proc/net/bonding ]] || modprobe bonding mode=${BONDING_MODE[$i]} miimon=${BONDING_MIIMON[$i]} @@ -350,7 +358,7 @@ ipaddr_up(){ [[ $IP == ipv4 ]] && DHCP_OPTIONS="$DHCP_OPTIONS -4" [[ $IP == ipv6 ]] && DHCP_OPTIONS="$DHCP_OPTIONS -6" [[ $IP != ipv4 && -n $PRIV6 && -d $CONF6/$IFACE ]] && echo $PRIV6 >$CONF6/$IFACE/use_tempaddr - if [[ $(cat $SYSTEM/$IFACE/carrier 2>/dev/null) == 1 ]]; then + if carrier_up $IFACE; then # interface is UP log "interface $IFACE is UP, polling up to 60 sec for DHCP $IP server" if ! run timeout 60 dhcpcd -w $DHCP_OPTIONS $IFACE; then From bb92781ccee73a95f9712df6cb1ed33d8af77225 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 8 Oct 2023 08:48:10 +0200 Subject: [PATCH 09/14] scripts dutchification - batch 2 --- etc/rc.d/rc.messagebus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/rc.d/rc.messagebus b/etc/rc.d/rc.messagebus index f9a19126a..438f93112 100755 --- a/etc/rc.d/rc.messagebus +++ b/etc/rc.d/rc.messagebus @@ -49,7 +49,7 @@ dbus_stop(){ if ! dbus_running; then REPLY="Already stopped" else - run kill $(cat $PIDFILE 2>/dev/null) + run kill $(cat $PIDFILE) # Just in case: run killall dbus-daemon rm -f $PIDFILE From 8dde29cc0db5b4806e580e9bb4a1688194227eea Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 8 Oct 2023 09:36:11 +0200 Subject: [PATCH 10/14] scripts dutchification - batch 1 --- etc/rc.d/rc.inet1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index 5a01453d9..1048eea71 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -178,8 +178,6 @@ bond_up(){ fi done [[ -n $PRIMARY ]] && run ip link set name ${BONDNAME[$i]} type bond primary $PRIMARY - # delay to allow bond initialization - sleep 3 } # function to delete bond interface @@ -373,6 +371,7 @@ ipaddr_up(){ [[ $j -eq $((${VLANS[$i]}-1)) ]] && sleep 3 elif [[ $DHCP == no ]]; then # bring up interface using static IP address + [[ carrier_up ]] ipv6_addr 0 1 if [[ $IP != ipv6 ]]; then [[ $j -eq 0 ]] && ADDR=${IPADDR[$i]} || ADDR=${IPADDR[$i,$j]} From 9fcf59d3d9afcc21b3a452519360ea07d60e2678 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 8 Oct 2023 09:41:25 +0200 Subject: [PATCH 11/14] scripts dutchification - batch 1 --- etc/rc.d/rc.inet1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index 1048eea71..f5d8aa848 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -478,6 +478,7 @@ if_up(){ [[ -n ${HWADDR[$i]} ]] && run ip link set $1 addr ${HWADDR[$i]} set_mtu $1 fi + run ip link set $IFACE up # set interface address [[ $i -eq 0 && $j -eq 0 ]] && MAIN=1 || MAIN= if [[ $IP == ipv4 ]]; then @@ -507,7 +508,6 @@ if_up(){ DHCP_KEEP_RESOLV=$DHCP6_KEEP_RESOLV ipaddr_up fi - run ip link set $IFACE up done } From 009132ce784847f2191b7080c77a6d89f768730f Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 8 Oct 2023 10:07:06 +0200 Subject: [PATCH 12/14] scripts dutchification - batch 1 --- etc/rc.d/rc.inet1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index f5d8aa848..01fb7f86c 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -164,7 +164,6 @@ carrier_up(){ bond_up(){ [[ -d /proc/net/bonding ]] || modprobe bonding mode=${BONDING_MODE[$i]} miimon=${BONDING_MIIMON[$i]} run ip link add name ${BONDNAME[$i]} type bond mode ${BONDING_MODE[$i]} miimon ${BONDING_MIIMON[$i]} - run ip link set ${BONDNAME[$i]} up set_mtu ${BONDNAME[$i]} PRIMARY=; # loop thru assigned interfaces in bond @@ -203,7 +202,6 @@ br_up(){ BRSTP[$i]=${BRSTP[$i]/no/0} BRSTP[$i]=${BRSTP[$i]/yes/1} run ip link add name $BRIDGE type bridge stp_state ${BRSTP[$i]} forward_delay ${BRFD[$i]} - run ip link set $BRIDGE up # loop thru assigned interfaces in bridge for BRNIC in ${BRNICS[$i]}; do [[ $j -eq 0 ]] && BRIF=$BRNIC || BRIF=$BRNIC.${VLANID[$i,$j]} From b260cc6cca6e9e3e4b6372d0a82d51a7c9446f01 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 8 Oct 2023 11:21:50 +0200 Subject: [PATCH 13/14] device_list: add translation for button "Add Subpool" --- emhttp/plugins/dynamix/nchan/device_list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/nchan/device_list b/emhttp/plugins/dynamix/nchan/device_list index 21dd74d1a..dbc5732a6 100755 --- a/emhttp/plugins/dynamix/nchan/device_list +++ b/emhttp/plugins/dynamix/nchan/device_list @@ -466,9 +466,9 @@ while (true) { }); if (count($current_subpools) < count($subpools)) { $current_subpools_list = str_replace("$pool~","", implode(',', $current_subpools)); - $subPoolButton = ""; + $subPoolButton = ""; } else { - $subPoolButton = ""; + $subPoolButton = ""; } $echo[$n] .= "$subPoolButton"; } From 69b5a886cb16a5ab5d41c398a41884e01edd46be Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 8 Oct 2023 12:05:08 +0200 Subject: [PATCH 14/14] rc.S: invoke testing hook for test versions only - This is a potential security risk, which should not be active in public releases --- etc/rc.d/rc.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/rc.S b/etc/rc.d/rc.S index 2a7fb7074..daf7382ff 100755 --- a/etc/rc.d/rc.S +++ b/etc/rc.d/rc.S @@ -155,8 +155,9 @@ else [[ $RETVAL -gt 0 ]] && abort "failed to remount $UNRAIDROOT r/w with return value $RETVAL" fi -# invoke testing hook -if [[ -f /boot/config/rc.S.extra ]]; then +# invoke testing hook (only for test versions) +. /etc/unraid-version +if [[ -f /boot/config/rc.S.extra && $version =~ beta ]]; then . /boot/config/rc.S.extra fi # and continue in separate script