blob: 1e550136014e1bd8a697c1b9a8da7afc21dba0b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/usr/bin/env bash
check() {
# Tell dracut that this module should only be included if it is required
# explicitly.
if ! hash dmidecode; then
echo "dmidecode is missing from this system, please install it."
return 1
fi
return 255
}
depends() {
echo busybox
}
install() {
mkdir -p "$initdir/etc/bad-uuid.d"
# check if we have an uuid blacklists installed by openslx/mltk on this system
if [ "$(ls -A /opt/openslx/bad-uuid.d)" ]; then
for blacklist in "/opt/openslx/bad-uuid.d"/* ]; do
inst_simple "$blacklist" "/etc/bad-uuid.d/${blacklist##*/}"
done
else
# use this module's default blacklist
inst_simple "$moddir/bad-uuid-defaults.conf" "/etc/bad-uuid.d/bad-uuid-defaults.conf"
fi
inst_multiple dmidecode
inst_hook pre-udev 05 "$moddir/scripts/get-system-uuid.sh"
inst_hook pre-pivot 10 "$moddir/scripts/copy-system-uuid-to-newroot.sh"
}
|