]> git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/91zipl/install_zipl_cmdline.sh
fips: Drop obsolete dependencies
[thirdparty/dracut.git] / modules.d / 91zipl / install_zipl_cmdline.sh
1 #!/bin/bash
2
3 DEV="$1"
4 MNT=/boot/zipl
5
6 if [ -z "$DEV" ] ; then
7 echo "No IPL device given"
8 > /tmp/install.zipl.cmdline-done
9 exit 1
10 fi
11
12 [ -d ${MNT} ] || mkdir -p ${MNT}
13
14 mount -o ro ${DEV} ${MNT}
15 if [ "$?" != "0" ] ; then
16 echo "Failed to mount ${MNT}"
17 > /tmp/install.zipl.cmdline-done
18 exit 1
19 fi
20
21 if [ -f ${MNT}/dracut-cmdline.conf ] ; then
22 cp ${MNT}/dracut-cmdline.conf /etc/cmdline.d/99zipl.conf
23 fi
24
25 if [ -f ${MNT}/active_devices.txt ] ; then
26 while read dev etc ; do
27 [ "$dev" = "#" -o "$dev" = "" ] && continue;
28 cio_ignore -r $dev
29 done < ${MNT}/active_devices.txt
30 fi
31
32 umount ${MNT}
33
34 if [ -f /etc/cmdline.d/99zipl.conf ] ; then
35 systemctl restart dracut-cmdline.service
36 systemctl restart systemd-udev-trigger.service
37 fi
38 > /tmp/install.zipl.cmdline-done
39
40 exit 0