Skip to content

Commit

Permalink
* Resolve issue with WIFI not starting on every boot.
Browse files Browse the repository at this point in the history
  * Revert kernel firmware update.
  * Enable systemd-resolved.
  * Enable firewalld.
  * Add system update feature to steamfork-postupdate-mgmt.
  * Check if NetworkManager is failed and restart it.
  • Loading branch information
fewtarius committed Jul 11, 2024
1 parent fcb800c commit 4ffda5a
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 7 deletions.
2 changes: 1 addition & 1 deletion PKGBUILD/linux-firmware/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkgbase=linux-firmware
pkgname=(linux-firmware-whence linux-firmware amd-ucode
linux-firmware-{nfp,mellanox,marvell,qcom,liquidio,qlogic,bnx2x}
)
pkgver=20240709
pkgver=20240610
pkgrel=1
pkgdesc="Firmware files for Linux"
url="https://gitlab.com/kernel-firmware/linux-firmware"
Expand Down
4 changes: 2 additions & 2 deletions PKGBUILD/steamfork-customizations-jupiter/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Maintainer: Fewtarius

pkgname=steamfork-customizations-jupiter
pkgver=2024.07.10
pkgrel=4
pkgver=2024.07.11
pkgrel=3
pkgdesc='SteamFork customizations provider.'
arch=('any')
url='http://www.steamfork.org'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ function check_network() {
fi
}

### Workaround NetworkManager randomly dying until a better solution
### can be found.

NM_ISACTIVE=$(systemctl is-active NetworkManager)
if [[ "${NM_ISACTIVE}" =~ inactive ]]
then
systemctl restart NetworkManager
fi

### Check for the last update stamp, and if it isn't a match
### run any post-update scripts and then update the stamp.

Expand All @@ -38,21 +47,33 @@ then
### Test for a condition where the device is started but network is not
### online and break.
COUNT=$(( ${COUNT} + 1 ))
if [ "${COUNT}" >= 10 ]
if (( ${COUNT} >= 10 ))
then
exit 0
fi
sleep 1
done

steamos-readonly disable >/var/log/update.log 2>&1

### System provided update directory.
if [ -d "/usr/share/post-update.d" ]
then
for UPDATE in /usr/share/post-update.d/*
do
${UPDATE} >>/var/log/update.log 2>&1
done
fi

### User writeable update directory.
if [ -d "/etc/post-update.d" ]
then
for UPDATE in /etc/post-update.d/*
do
${UPDATE} >>/var/log/update.log 2>&1
done
fi

steamos-readonly enable >>/var/log/update.log 2>&1
echo "${BUILD_ID}" >${UPDATE_STAMP}
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present Fewtarius

### Update the local resolver to use systemd-resolved.
RESOLVECONF_HASH="$(sha256sum /etc/resolv.conf | awk '{print $1}')"
RESOLVED_HASH="$(sha256sum /run/systemd/resolve/stub-resolv.conf | awk '{print $1}')"
if [ ! "${RESOLVECONF_HASH}" = "${RESOLVED_HASH}" ]
then
rm -f /etc/resolv.conf
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
fi
10 changes: 7 additions & 3 deletions rootfs/steamfork/build-image
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,18 @@ echo "(4.10/6) Fix runtime audio configuration."
arch-chroot ${ROOT_WORKDIR} systemctl enable ${AUDIO_SERVICE}-sysconf.service
done

echo "(4.11/6) Delete conflicting files..."
echo "(4.11/6) Enable systemd-resolved."
rm -f ${ROOT_WORKDIR}/etc/resolv.conf
ln -sf /run/systemd/resolve/stub-resolv.conf ${ROOT_WORKDIR}/etc/resolv.conf

echo "(4.12/6) Delete conflicting files..."
# Delete conflicting files
for CONFLICT in etc/X11/Xsession.d/50rotate-screen \
etc/sddm.conf.d/steamdeck.conf
do
if [ -e "${SCRIPTPATH}/airootfs/${CONFLICT}" ]
if [ -e "${ROOT_WORKDIR}/${CONFLICT}" ]
then
rm -f "${SCRIPTPATH}/airootfs/${CONFLICT}"
rm -f "${ROOT_WORKDIR}/${CONFLICT}"
fi
done

Expand Down
2 changes: 2 additions & 0 deletions rootfs/steamfork/presets/minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo -e "$(echo ${DISTRO_NAME} | tr '[:upper:]' '[:lower:]')_$(echo ${OS_CODENAM
export BUILDVER=$(cat /tmp/build_temp_ver)
export IMAGEFILE="${BUILDVER}"
export ENABLED_SERVICES=( NetworkManager
firewalld
systemd-resolved
nix.mount
steamos-offload.target
fstrim.timer
Expand Down
2 changes: 2 additions & 0 deletions rootfs/steamfork/presets/rel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export IMAGEFILE="${BUILDVER}"
export ENABLED_SERVICES=( sddm
bluetooth
systemd-timesyncd
systemd-resolved
NetworkManager
firewalld
inputplumber
steam-powerbuttond
steamos-offload.target
Expand Down

0 comments on commit 4ffda5a

Please sign in to comment.