summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--README1
-rwxr-xr-xdracut6
-rwxr-xr-xhooks/cryptroot.sh (renamed from hooks/cryptroot)0
-rwxr-xr-xhooks/resume.sh (renamed from hooks/resume)0
-rwxr-xr-xhooks/selinux-loadpolicy.sh (renamed from hooks/selinux-loadpolicy)0
-rwxr-xr-xinit2
-rwxr-xr-xmodules/00dash.sh (renamed from modules/00dash)0
-rwxr-xr-xmodules/10redhat-i18n.sh (renamed from modules/10redhat-i18n)0
-rwxr-xr-xmodules/90crypt.sh (renamed from modules/90crypt)2
-rwxr-xr-xmodules/90kernel-modules.sh (renamed from modules/90kernel-modules)0
-rwxr-xr-xmodules/90lvm.sh (renamed from modules/90lvm)0
-rwxr-xr-xmodules/95debug.sh (renamed from modules/95debug)0
-rwxr-xr-xmodules/95terminfo.sh (renamed from modules/95terminfo)0
-rwxr-xr-xmodules/95udev-rules.sh (renamed from modules/95udev-rules)0
-rwxr-xr-xmodules/99base.sh (renamed from modules/99base)4
16 files changed, 10 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 70d6782..dbc2a7d 100644
--- a/Makefile
+++ b/Makefile
@@ -12,8 +12,8 @@ install:
install -m 0755 dracut-functions $(DESTDIR)/usr/libexec/dracut/functions
mkdir $(DESTDIR)/usr/libexec/dracut/rules.d
for rule in rules.d/*.rules ; do install -m 0644 $$rule $(DESTDIR)/usr/libexec/dracut ; done
- for hook in hooks/* ; do install -m 0755 $$hook $(DESTDIR)/usr/libexec/dracut ; done
- for module in modules/*; do install -m 0755 $$module $(DESTDIR)/usr/libexec/dracut ; done
+ for hook in hooks/*.sh ; do install -m 0755 $$hook $(DESTDIR)/usr/libexec/dracut ; done
+ for module in modules/*.sh; do install -m 0755 $$module $(DESTDIR)/usr/libexec/dracut ; done
clean:
rm -f *~
diff --git a/README b/README
index abc282a..1c377b4 100644
--- a/README
+++ b/README
@@ -37,6 +37,7 @@ Some general rules for writing modules:
* Generator modules should have a two digit numeric prefix -- they run in
ascending sort order. Anything in the 90-99 range is stuff that dracut
relies on, so try not to break those hooks.
+ * Generator modules and hooks must have a .sh extension.
Also, there is an attempt to keep things as distribution-agnostic as
possible. Every distribution has their own tool here and it's not
diff --git a/dracut b/dracut
index 1378268..c00944e 100755
--- a/dracut
+++ b/dracut
@@ -44,7 +44,7 @@ hookdirs="pre-udev pre-mount pre-pivot"
initdir=$(mktemp -d -t initramfs.XXXXXX)
trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
-export initdir hookdirs rulesdir dsrc dracutmodules kmodules
+export initdir hookdirs rulesdir dsrc dracutmodules modules
# Create some directory structure first
for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot dev/pts; do
@@ -52,8 +52,8 @@ for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot dev/pts; do
done
# source all our modules
-for f in "$dsrc/modules"/*[^~]; do
- mod=${f##*/}; mod=${mod#[0-9][0-9]}
+for f in "$dsrc/modules"/*.sh; do
+ mod=${f##*/}; mod=${mod#[0-9][0-9]}; mod=${mod%.sh}
if [[ $dracutmodules = all ]] || strstr "$dracutmodules" "$mod"; then
[[ -x $f ]] && . "$f"
fi
diff --git a/hooks/cryptroot b/hooks/cryptroot.sh
index 0664f24..0664f24 100755
--- a/hooks/cryptroot
+++ b/hooks/cryptroot.sh
diff --git a/hooks/resume b/hooks/resume.sh
index 4f1d6c3..4f1d6c3 100755
--- a/hooks/resume
+++ b/hooks/resume.sh
diff --git a/hooks/selinux-loadpolicy b/hooks/selinux-loadpolicy.sh
index ceece63..ceece63 100755
--- a/hooks/selinux-loadpolicy
+++ b/hooks/selinux-loadpolicy.sh
diff --git a/init b/init
index ad6c06f..06689a6 100755
--- a/init
+++ b/init
@@ -24,7 +24,7 @@ getarg() {
source_all() {
local f
[ "$1" ] && [ -d "/$1" ] || return
- for f in "/$1"/*; do [ -f "$f" ] && . "$f"; done
+ for f in "/$1"/*.sh; do [ -f "$f" ] && . "$f"; done
}
echo "Starting initrd..."
diff --git a/modules/00dash b/modules/00dash.sh
index 8af1e7c..8af1e7c 100755
--- a/modules/00dash
+++ b/modules/00dash.sh
diff --git a/modules/10redhat-i18n b/modules/10redhat-i18n.sh
index ae50bbc..ae50bbc 100755
--- a/modules/10redhat-i18n
+++ b/modules/10redhat-i18n.sh
diff --git a/modules/90crypt b/modules/90crypt.sh
index 66d7e70..9793a4f 100755
--- a/modules/90crypt
+++ b/modules/90crypt.sh
@@ -1,4 +1,4 @@
#!/bin/bash
inst cryptsetup
inst_rules "$dsrc/rules.d/63-luks.rules"
-inst_hook pre-mount 50 "$dsrc/hooks/cryptroot" \ No newline at end of file
+inst_hook pre-mount 50 "$dsrc/hooks/cryptroot.sh" \ No newline at end of file
diff --git a/modules/90kernel-modules b/modules/90kernel-modules.sh
index 8265b60..8265b60 100755
--- a/modules/90kernel-modules
+++ b/modules/90kernel-modules.sh
diff --git a/modules/90lvm b/modules/90lvm.sh
index 315fbb8..315fbb8 100755
--- a/modules/90lvm
+++ b/modules/90lvm.sh
diff --git a/modules/95debug b/modules/95debug.sh
index 4579212..4579212 100755
--- a/modules/95debug
+++ b/modules/95debug.sh
diff --git a/modules/95terminfo b/modules/95terminfo.sh
index 7f14aa1..7f14aa1 100755
--- a/modules/95terminfo
+++ b/modules/95terminfo.sh
diff --git a/modules/95udev-rules b/modules/95udev-rules.sh
index 9801e7e..9801e7e 100755
--- a/modules/95udev-rules
+++ b/modules/95udev-rules.sh
diff --git a/modules/99base b/modules/99base.sh
index 4963beb..1d9f86e 100755
--- a/modules/99base
+++ b/modules/99base.sh
@@ -3,6 +3,6 @@ dracut_install mount mknod mkdir modprobe pidof sleep chroot echo sed sh ls
# install our scripts and hooks
inst "$initfile" "/init"
inst "$switchroot" "/sbin/switch_root"
-inst_hook pre-pivot 50 "$dsrc/hooks/selinux-loadpolicy"
-inst_hook pre-mount 99 "$dsrc/hooks/resume"
+inst_hook pre-pivot 50 "$dsrc/hooks/selinux-loadpolicy.sh"
+inst_hook pre-mount 99 "$dsrc/hooks/resume.sh"