dmsquash-live-genrules.sh 623 B

12345678910111213141516171819
  1. #!/bin/sh
  2. case "$root" in
  3. live:/dev/*)
  4. {
  5. printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root %s"\n' \
  6. "${root#live:/dev/}" "${root#live:}"
  7. printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root %s"\n' \
  8. "${root#live:/dev/}" "${root#live:}"
  9. } >> /etc/udev/rules.d/99-live-squash.rules
  10. wait_for_dev -n "${root#live:}"
  11. ;;
  12. live:*)
  13. if [ -f "${root#live:}" ]; then
  14. /sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root "${root#live:}"
  15. fi
  16. ;;
  17. esac