summaryrefslogtreecommitdiffstats
path: root/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/90dmsquash-live/dmsquash-live-genrules.sh')
-rwxr-xr-xmodules.d/90dmsquash-live/dmsquash-live-genrules.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
new file mode 100755
index 0000000..8c7cad8
--- /dev/null
+++ b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
@@ -0,0 +1,18 @@
+#!/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