OSDN Git Service

[update] : Added archiso v50.1 initcpio
authorhayao <hayao@fascode.net>
Sat, 20 Mar 2021 00:48:44 +0000 (09:48 +0900)
committerhayao <hayao@fascode.net>
Sat, 20 Mar 2021 00:48:44 +0000 (09:48 +0900)
system/initcpio/archiso_shutdown [deleted file]
system/initcpio/hooks/archiso_pxe_common

diff --git a/system/initcpio/archiso_shutdown b/system/initcpio/archiso_shutdown
deleted file mode 100755 (executable)
index 4a0c7dc..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/ash
-
-# /oldroot depends on things inside /oldroot/run/archiso...
-mkdir /oldrun
-mount -n --move /oldroot/run /oldrun
-
-# Unmount all mounts now.
-umount "$(mount | awk '$3 ~/^\/oldroot/ {print $3}' | sort -r)"
-
-# Remove all dm-snapshot devices.
-dmsetup remove_all
-
-# Remove all loopback devices.
-for _lup in $(grep ^/dev/loop /oldrun/archiso/used_block_devices | tac); do
-    if ! losetup -d -- "${_lup}" 2> /dev/null; then
-        umount -d -- "${_lup}"
-    fi
-done
-
-# Unmount the space used to store *.cow.
-umount /oldrun/archiso/cowspace
-
-# Unmount boot device if needed (no copytoram=y used)
-if [ ! -d /oldrun/archiso/copytoram ]; then
-    if [ -d /oldrun/archiso/img_dev ]; then
-        umount /oldrun/archiso/img_dev
-    else
-        umount /oldrun/archiso/bootmnt
-    fi
-fi
-
-# reboot / poweroff / halt, depending on the argument passed by init
-# if something invalid is passed, we halt
-case "$1" in
-  reboot|poweroff|halt) "$1" -f ;;
-  *) halt -f;;
-esac
-
-# vim: set ft=sh:
index f02ef12..a47b6c0 100644 (file)
@@ -67,11 +67,13 @@ run_latehook () {
         # shellcheck disable=SC2154
         # defined via initcpio's parse_cmdline()
         if [ "${copytoram}" = "y" ]; then
-            if [ -n "${bootif_dev}" ]; then
-                ip addr flush dev "${bootif_dev}"
-                ip link set "${bootif_dev}" down
-            fi
+            for curif in /sys/class/net/*; do
+                netdev=${curif#/sys/class/net/}
+                ip addr flush dev "${netdev}"
+                ip link set "${netdev}" down
+            done
         elif [ "${copy_resolvconf}" != "n" ] && [ -f /etc/resolv.conf ]; then
+            rm -f /new_root/etc/resolv.conf
             cp /etc/resolv.conf /new_root/etc/resolv.conf
         fi
     fi