From 3a330ba3316e63c515011dd9bcfdbfc64c2e2b96 Mon Sep 17 00:00:00 2001 From: Benjamin Pereto Date: Sun, 4 Jan 2015 17:42:44 +0100 Subject: add dracut module Signed-off-by: Christian Hesse --- Makefile | 5 ++++- dracut/module-setup.sh | 21 +++++++++++++++++++++ dracut/parse-mod.sh | 4 ++++ dracut/ykfde.sh | 6 ++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 dracut/module-setup.sh create mode 100755 dracut/parse-mod.sh create mode 100755 dracut/ykfde.sh diff --git a/Makefile b/Makefile index 8bd9d26..b57bb88 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,10 @@ install-mkinitcpio: install-bin install-doc $(INSTALL) -D -m0644 udev/20-ykfde.rules $(DESTDIR)/usr/lib/initcpio/udev/20-ykfde.rules install-dracut: install-bin install-doc - # porting to dracut? install your files here. + $(INSTALL) -D -m0755 dracut/module-setup.sh $(DESTDIR)/usr/lib/dracut/modules.d/90ykfde/module-setup.sh + $(INSTALL) -D -m0755 dracut/parse-mod.sh $(DESTDIR)/usr/lib/dracut/modules.d/90ykfde/parse-mod.sh + $(INSTALL) -D -m0755 dracut/ykfde.sh $(DESTDIR)/usr/lib/dracut/modules.d/90ykfde/ykfde.sh + $(INSTALL) -D -m0644 udev/20-ykfde.rules $(DESTDIR)/usr/lib/dracut/modules.d/90ykfde/20-ykfde.rules clean: $(MAKE) -C bin clean diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh new file mode 100755 index 0000000..86fcd32 --- /dev/null +++ b/dracut/module-setup.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +check() { + return 0 +} + +# called by dracut +depends() { + return 0 +} + +install() { + inst_rules "$moddir/20-ykfde.rules" + inst_hook cmdline 30 "$moddir/parse-mod.sh" + inst_simple "$moddir/ykfde.sh" /sbin/ykfde.sh + inst_simple /usr/lib/udev/ykfde + inst_simple /etc/ykfde.conf + + dracut_need_initqueue +} + diff --git a/dracut/parse-mod.sh b/dracut/parse-mod.sh new file mode 100755 index 0000000..2ac9de2 --- /dev/null +++ b/dracut/parse-mod.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +/sbin/initqueue --settled --unique --onetime /sbin/ykfde.sh + diff --git a/dracut/ykfde.sh b/dracut/ykfde.sh new file mode 100755 index 0000000..6e66334 --- /dev/null +++ b/dracut/ykfde.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Placeholder to do something + +exit 0 + -- cgit v1.2.3-70-g09d2