milis/bin/dracut/dmsquash-live-genrules.sh

19 lines
623 B
Bash
Raw Normal View History

2016-02-24 01:27:23 +01:00
#!/bin/sh
case "$root" in
live:/dev/*)
{
printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root %s"\n' \
"${root#live:/dev/}" "${root#live:}"
printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root %s"\n' \
"${root#live:/dev/}" "${root#live:}"
} >> /etc/udev/rules.d/99-live-squash.rules
wait_for_dev -n "${root#live:}"
;;
live:*)
if [ -f "${root#live:}" ]; then
/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root "${root#live:}"
fi
;;
esac