Skip to content

Commit

Permalink
Merge branch 'dev' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
JappeHallunken authored Mar 10, 2024
2 parents 69210a5 + 6beb0c9 commit 4dac42d
Show file tree
Hide file tree
Showing 12 changed files with 195 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log
packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,'
[[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils'
G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat /dev/shm/rootfs/debootstrap/debootstrap.log; }
G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; }
G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo"
G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log

Expand Down
5 changes: 4 additions & 1 deletion .build/software/Amiberry/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ G_AGUP
G_AGDUG "${adeps_build[@]}"
for i in "${adeps[@]}"
do
dpkg-query -s "$i" &> /dev/null && continue
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue
G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i"
exit 1
done
Expand Down Expand Up @@ -185,6 +186,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed "
DEPS_APT_VERSIONED=
for i in "${adeps[@]}"
do
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || i+='t64'
DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i")),"
done
DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,}
Expand Down
6 changes: 3 additions & 3 deletions .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ fi
# Install Go for Gogs
[[ $NAME == 'gogs' ]] && G_CONFIG_INJECT 'AUTO_SETUP_INSTALL_SOFTWARE_ID=' 'AUTO_SETUP_INSTALL_SOFTWARE_ID=188' rootfs/boot/dietpi.txt

# Gogs on RISC-V: Temporarily switch to dev branch until DietPi v8.24 has been released, installing Go from go.dev instead of APT
[[ $NAME == 'gogs' && $ARCH == 'riscv64' ]] && G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' rootfs/boot/dietpi.txt

# Workaround invalid TERM on login
# shellcheck disable=SC2016
G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsupported TERM=\"$TERM\", switching to TERM=\"dumb\""; export TERM=dumb; }'\'' > rootfs/etc/bashrc.d/00-dietpi-build.sh'

# Workaround for failing IPv4 network connectivity check as GitHub Actions runners do not receive external ICMP echo replies
G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=127.0.0.1' rootfs/boot/dietpi.txt

# Shutdown on failures before the custom script is executed
G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login

# Avoid DietPi-Survey uploads to not mess with the statistics
G_EXEC rm rootfs/root/.ssh/known_hosts

Expand Down
13 changes: 7 additions & 6 deletions .build/software/squeezelite/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@ case $G_DISTRO in
esac
for i in "${adeps[@]}"
do
dpkg-query -s "$i" &> /dev/null && continue
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue
G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i"
exit 1
done

G_DIETPI-NOTIFY 2 'Downloading source code...'
G_EXEC cd /tmp
# Freeze commit: https://github.com/ralph-irving/squeezelite/issues/206
G_EXEC curl -sSfLO 'https://github.com/ralph-irving/squeezelite/archive/6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz'
G_EXEC curl -sSfLO 'https://github.com/ralph-irving/squeezelite/archive/master.tar.gz'
[[ -d 'squeezelite-master' ]] && G_EXEC rm -R squeezelite-master
G_EXEC tar xf 6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz
G_EXEC rm 6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz
G_EXEC tar xf master.tar.gz
G_EXEC rm master.tar.gz
G_DIETPI-NOTIFY 2 'Compiling binary...'
G_EXEC mv squeezelite-{6de9e229aa4cc7c3131ff855f3ead39581127090,master}
G_EXEC cd squeezelite-master
G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' OPTS='-DDSD -DFFMPEG -DRESAMPLE -DVISEXPORT -DLINKALL -DIR -DUSE_SSL'
G_EXEC strip --remove-section=.comment --remove-section=.note squeezelite
Expand Down Expand Up @@ -143,6 +142,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed "
DEPS_APT_VERSIONED=
for i in "${adeps[@]}"
do
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || i+='t64'
DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i")),"
done
DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,}
Expand Down
5 changes: 4 additions & 1 deletion .build/software/vaultwarden/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ G_AGUP
G_AGDUG "${adeps_build[@]}"
for i in "${adeps[@]}"
do
dpkg-query -s "$i" &> /dev/null && continue
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue
G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i"
exit 1
done
Expand Down Expand Up @@ -205,6 +206,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed "
DEPS_APT_VERSIONED=
for i in "${adeps[@]}"
do
# Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394
dpkg-query -s "$i" &> /dev/null || i+='t64'
DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i")),"
done
DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Process_Software()
132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port
133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;;
134) aCOMMANDS[i]='docker compose version';;
135) aSERVICES[i]='icecast2 darkice' aTCP[i]='8000';;
135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce'\';; # darkice service cannot start in container as is requires audio recording device access
136) aSERVICES[i]='motioneye' aTCP[i]='8765';;
137) aCOMMANDS[i]='/opt/mjpg-streamer/mjpg_streamer -v';; # aSERVICES[i]='mjpg-streamer' aTCP[i]='8082' Service does not start without an actual video device
138) aSERVICES[i]='virtualhere' aTCP[i]='7575';;
Expand Down Expand Up @@ -413,9 +413,9 @@ done

# Success flag and shutdown
# shellcheck disable=SC2016
G_EXEC eval 'echo '\''[ $exit_code = 0 ] && > /success || { journalctl -n 50; ss -tlpn; df -h; free -h; poweroff; }; poweroff'\'' >> rootfs/boot/Automation_Custom_Script.sh'
G_EXEC eval 'echo '\''[ $exit_code = 0 ] && > /success || { journalctl -n 50; ss -tulpn; df -h; free -h; }; poweroff'\'' >> rootfs/boot/Automation_Custom_Script.sh'

# Shutdown as well on failure
# Shutdown as well on failures before the custom script is executed
G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login

##########################################
Expand Down
107 changes: 53 additions & 54 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1472,36 +1472,6 @@ Patch_9_1()
G_EXEC rm /etc/kernel/postinst.d/dietpi-USBridgeSig
fi

# Quartz64
if (( $G_HW_MODEL == 49 ))
then
for i in quartz64{a,b} soquartz
do
dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.7.4-dietpi1 || continue
G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..."
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb"
G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb
G_EXEC rm package.deb
break
done

# VisionFive 2
elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.78-dietpi1
then
G_DIETPI-NOTIFY 2 'Updating RISC-V StarFive VisionFive 2 kernel ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb
G_EXEC rm package.deb

# Star64
elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.78-dietpi1
then
G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb
G_EXEC rm package.deb
fi

# Software updates and migrations
if [[ -f '/boot/dietpi/.installed' ]]
then
Expand Down Expand Up @@ -1535,36 +1505,12 @@ map $arg_v $asset_immutable {
G_EXEC sed -i "s|, reboot, poweroff|, $(which reboot), $(which poweroff)|" /etc/sudoers.d/octoprint
fi

# Squeezelite
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1465-dietpi1
then
G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb"
G_AGI ./package.deb
G_EXEC rm package.deb
fi

# Amiberry
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.6-dietpi1
then
G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend'
echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls
fi

# vaultwarden
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.3-dietpi2
then
# Pre-v8.7 cleanup
if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]]
then
G_EXEC rm -R /opt/vaultwarden
[[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service
fi
G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb"
G_AGI ./package.deb
G_EXEC rm package.deb
fi
fi
}

Expand All @@ -1581,6 +1527,35 @@ Patch_9_2()
dpkg-query -s 'linux-headers-current-rockchip64' &> /dev/null && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb'; headers=('package4.deb'); }
G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}"
G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}"

# Quartz64
elif (( $G_HW_MODEL == 49 ))
then
for i in quartz64{a,b} soquartz
do
dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.7.4-dietpi1 || continue
G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..."
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb"
G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb
G_EXEC rm package.deb
break
done

# VisionFive 2
elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.81-dietpi1
then
G_DIETPI-NOTIFY 2 'Updating RISC-V StarFive VisionFive 2 kernel ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb
G_EXEC rm package.deb

# Star64
elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.81-dietpi1
then
G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb
G_EXEC rm package.deb
fi

# Software updates and migrations
Expand Down Expand Up @@ -1608,6 +1583,30 @@ Patch_9_2()
G_EXEC sed -i 's/^auth-type: floodgate/ auth-type: floodgate/' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml
fi
fi

# Squeezelite
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1468-dietpi1
then
G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb"
G_AGI ./package.deb
G_EXEC rm package.deb
fi

# vaultwarden
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.5-dietpi1
then
# Pre-v8.7 cleanup
if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]]
then
G_EXEC rm -R /opt/vaultwarden
[[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service
fi
G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb"
G_AGI ./package.deb
G_EXEC rm package.deb
fi
fi
}

Expand Down
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=9
G_REMOTE_VERSION_SUB=2
G_REMOTE_VERSION_RC=-1
G_REMOTE_VERSION_RC=0
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=7
G_MIN_VERSION_SUB=0
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ v9.2

Enhancements:
- NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342
- DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang.

Bug fixes:
- DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL.
- DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session.
- DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898
- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config, where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372
- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372
- DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931
- DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions.
- DietPi-Software | LXQt: Resolved an issue where the installation failed on Trixie and RISC-V systems, since we did not host a config archive for those Debian versions yet. Many thanks to @jtmoon79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6939

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME

Expand Down
33 changes: 18 additions & 15 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -1930,23 +1930,26 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will
\nThis will free up space, but an internet-capable Ethernet connection is required to re-enable WiFi functionality.
\nAffected packages: iw wireless-tools wpasupplicant wireless-regdb crda' && G_AGP 'iw' 'wireless-tools' 'wpasupplicant' 'wireless-regdb' 'crda'

# Drop connections
G_DIETPI-NOTIFY 2 'Dropping network connections, please wait...'
ifdown --force "$ETH_DEV_IFACE" 2> /dev/null
ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null

# Kill DHCP client
killall dhclient 2> /dev/null

# Restart network
G_DIETPI-NOTIFY 2 'Restarting network connections, please wait...'
G_EXEC systemctl daemon-reload

# Manually bring up adapters
(( $ETH_DISABLED )) || ifup --force "$ETH_DEV_IFACE"
if (( ! $WIFI_DISABLED ))
# - Ethernet
if (( ! $ETH_DISABLED ))
then
(( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf && ifup --force "$WIFI_DEV_IFACE"
journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" &
G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$ETH_DEV_IFACE"
kill -15 %%
else
ifdown --force "$ETH_DEV_IFACE" 2> /dev/null
fi
# - WiFi: Only try to configure if this is either a hotspot or an SSID has been configured
if (( ! $WIFI_DISABLED )) && { (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf; }
then
journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" &
G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$WIFI_DEV_IFACE"
kill -15 %%
else
ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null
fi

# Start WiFi hotspot
Expand Down Expand Up @@ -2287,14 +2290,14 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang
do
if (( $i < $full_octets ))
then
mask+=255
mask+='255'

elif (( $i == $full_octets ))
then
mask+=$(( 256 - 2 ** ( 8 - $partial_octet ) ))

else
mask+=0
mask+='0'
fi
(( $i < 3 )) && mask+=.
done
Expand Down
Loading

0 comments on commit 4dac42d

Please sign in to comment.