]> git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/90dmsquash-live/module-setup.sh
Renamed all shell scripts to *.sh
[thirdparty/dracut.git] / modules.d / 90dmsquash-live / module-setup.sh
1 #!/bin/bash
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4
5 check() {
6 # a live host-only image doesn't really make a lot of sense
7 [[ $hostonly ]] && return 1
8 return 255
9 }
10
11 depends() {
12 # if dmsetup is not installed, then we cannot support fedora/red hat
13 # style live images
14 echo dm rootfs-block
15 return 0
16 }
17
18 installkernel() {
19 instmods squashfs loop
20 }
21
22 install() {
23 dracut_install umount
24 inst dmsetup
25 inst blkid
26 inst dd
27 inst losetup
28 inst grep
29
30 dracut_install -o eject
31
32 inst blockdev
33 type -P checkisomd5 >/dev/null && inst checkisomd5
34 inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"
35 inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh"
36 inst_hook pre-udev 30 "$moddir/dmsquash-liveiso-genrules.sh"
37 inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
38 inst "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
39 # should probably just be generally included
40 inst_rules 60-cdrom_id.rules
41 }
42