archiso: Sync

Signed-off-by: Peter Jung <admin@ptr1337.dev>
This commit is contained in:
Peter Jung committed 2026-04-15 17:32:48 +02:00
1 parent 47b3fd2668
commit 6edb489e16
3 files changed
+8 -10

No files matched your search

@@ -6,8 +6,8 @@ Type = Package
Target = pacman-mirrorlist
[Action]
Description = Uncommenting all mirrors in /etc/pacman.d/mirrorlist...
Description = Uncommenting HTTPS mirrors in /etc/pacman.d/mirrorlist...
When = PostTransaction
Depends = pacman-mirrorlist
Depends = sed
Exec = /usr/bin/sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
Exec = /usr/bin/sed -E -i 's/#(Server = https:)/\1/g' /etc/pacman.d/mirrorlist
@@ -1,3 +1,3 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin liveuser - $TERM
ExecStart=-/usr/bin/agetty --noreset --noclear --autologin liveuser - ${TERM}
+5 -7
View File
@@ -17,13 +17,12 @@ automated_script() {
script="$(script_cmdline)"
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
if [[ "${script}" =~ ^((http|https|ftp|tftp)://) ]]; then
# there's no synchronization for network availability before executing this script
printf '%s: waiting for network-online.target\n' "$0"
until systemctl --quiet is-active network-online.target; do
sleep 1
done
printf '%s: downloading %s\n' "$0" "${script}"
curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script
# there's no synchronization for network availability before executing this script; to ensure the network
# is online, we use a transient systemd service that depends on network-online.target to download the
# script rather than manually polling the target
systemd-run --pty --quiet -p Wants=network-online.target -p After=network-online.target \
curl "${script}" --location --retry-connrefused --retry 10 --fail -s -o /tmp/startup_script
rt=$?
else
cp "${script}" /tmp/startup_script
@@ -42,4 +41,3 @@ automated_script() {
if [[ $(tty) == "/dev/tty1" ]]; then
automated_script
fi