Browse Source

51-dracut-rescue-postinst.sh,51-dracut-rescue.install: use systemd-machine-id-setup

if /etc/machine-id is empty, use systemd-machine-id-setup
master
Harald Hoyer 12 years ago
parent
commit
478aa7dac1
  1. 5
      51-dracut-rescue-postinst.sh
  2. 6
      51-dracut-rescue.install

5
51-dracut-rescue-postinst.sh

@ -8,6 +8,11 @@ KERNEL_VERSION="$1" @@ -8,6 +8,11 @@ KERNEL_VERSION="$1"
KERNEL_IMAGE="$2"

[[ -f /etc/os-release ]] && . /etc/os-release

if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then
systemd-machine-id-setup
fi

[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id

[[ $MACHINE_ID ]] || exit 1

6
51-dracut-rescue.install

@ -31,7 +31,13 @@ dropindirs_sort() @@ -31,7 +31,13 @@ dropindirs_sort()
}

[[ -f /etc/os-release ]] && . /etc/os-release

if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then
systemd-machine-id-setup
fi

[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id

if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi

Loading…
Cancel
Save