summaryrefslogtreecommitdiffstats
path: root/dev-tools
diff options
context:
space:
mode:
authortorben2016-03-24 16:45:37 +0100
committertorben2016-03-24 16:45:37 +0100
commit9795ce5e2b105f3869f985829aabcc82eaeb447a (patch)
tree411e2e674a830f87ee1ed672c388a93082e30056 /dev-tools
parentTidy up. (diff)
downloadsystemd-init-9795ce5e2b105f3869f985829aabcc82eaeb447a.tar.gz
systemd-init-9795ce5e2b105f3869f985829aabcc82eaeb447a.tar.xz
systemd-init-9795ce5e2b105f3869f985829aabcc82eaeb447a.zip
Adding dummy dracut module.
Diffstat (limited to 'dev-tools')
-rwxr-xr-xdev-tools/exampleDracutModule/apply-package.sh6
-rwxr-xr-xdev-tools/exampleDracutModule/module-setup.sh40
2 files changed, 46 insertions, 0 deletions
diff --git a/dev-tools/exampleDracutModule/apply-package.sh b/dev-tools/exampleDracutModule/apply-package.sh
new file mode 100755
index 00000000..45155408
--- /dev/null
+++ b/dev-tools/exampleDracutModule/apply-package.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+# -*- coding: utf-8 -*-
+
+echo --------------------------------------------------------------------------
+echo TEST
+echo --------------------------------------------------------------------------
diff --git a/dev-tools/exampleDracutModule/module-setup.sh b/dev-tools/exampleDracutModule/module-setup.sh
new file mode 100755
index 00000000..6a0fe8f5
--- /dev/null
+++ b/dev-tools/exampleDracutModule/module-setup.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+# -*- coding: utf-8 -*-
+
+source "$(dirname "${BASH_SOURCE[0]}")/../dnbd3-rootfs/scripts/rebash/core.sh"
+core.import exceptions
+core.import logging
+
+check() {
+ local __doc__='
+ Checks whether needed assumptions are satisfied.
+
+ Example:
+
+ `check`
+ '
+ # Tell dracut that this module should only be included if it is required
+ # explicitly.
+ return 255
+}
+depends() {
+ local __doc__='
+ Outputs all dependent dracut modules to make this module work.
+
+ >>> depends
+ +doc_test_contains
+ base
+ '
+ echo dnbd3-rootfs
+}
+install() {
+ local __doc__='
+ Copies all needed files into the initramfs image and registers all needed
+ dracut hooks.
+
+ Example:
+
+ `install`
+ '
+ inst_hook pre-pivot 00 "$moddir/apply-package.sh"
+}