Skip to content

Commit e99267b

Browse files
committed
Revert "[update] : Added archiso v50.1 initcpio"
This reverts commit ec9f8b3.
1 parent 2c7b250 commit e99267b

2 files changed

Lines changed: 43 additions & 6 deletions

File tree

system/initcpio/archiso_shutdown

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/ash
2+
3+
# /oldroot depends on things inside /oldroot/run/archiso...
4+
mkdir /oldrun
5+
mount -n --move /oldroot/run /oldrun
6+
7+
# Unmount all mounts now.
8+
umount "$(mount | awk '$3 ~/^\/oldroot/ {print $3}' | sort -r)"
9+
10+
# Remove all dm-snapshot devices.
11+
dmsetup remove_all
12+
13+
# Remove all loopback devices.
14+
for _lup in $(grep ^/dev/loop /oldrun/archiso/used_block_devices | tac); do
15+
if ! losetup -d -- "${_lup}" 2> /dev/null; then
16+
umount -d -- "${_lup}"
17+
fi
18+
done
19+
20+
# Unmount the space used to store *.cow.
21+
umount /oldrun/archiso/cowspace
22+
23+
# Unmount boot device if needed (no copytoram=y used)
24+
if [ ! -d /oldrun/archiso/copytoram ]; then
25+
if [ -d /oldrun/archiso/img_dev ]; then
26+
umount /oldrun/archiso/img_dev
27+
else
28+
umount /oldrun/archiso/bootmnt
29+
fi
30+
fi
31+
32+
# reboot / poweroff / halt, depending on the argument passed by init
33+
# if something invalid is passed, we halt
34+
case "$1" in
35+
reboot|poweroff|halt) "$1" -f ;;
36+
*) halt -f;;
37+
esac
38+
39+
# vim: set ft=sh:

system/initcpio/hooks/archiso_pxe_common

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ run_latehook () {
6767
# shellcheck disable=SC2154
6868
# defined via initcpio's parse_cmdline()
6969
if [ "${copytoram}" = "y" ]; then
70-
for curif in /sys/class/net/*; do
71-
netdev=${curif#/sys/class/net/}
72-
ip addr flush dev "${netdev}"
73-
ip link set "${netdev}" down
74-
done
70+
if [ -n "${bootif_dev}" ]; then
71+
ip addr flush dev "${bootif_dev}"
72+
ip link set "${bootif_dev}" down
73+
fi
7574
elif [ "${copy_resolvconf}" != "n" ] && [ -f /etc/resolv.conf ]; then
76-
rm -f /new_root/etc/resolv.conf
7775
cp /etc/resolv.conf /new_root/etc/resolv.conf
7876
fi
7977
fi

0 commit comments

Comments
 (0)