diff options
| author | jandob | 2016-03-24 17:49:09 +0100 |
|---|---|---|
| committer | jandob | 2016-03-24 17:49:09 +0100 |
| commit | f788dbdbe414089a728be044b2603dc3db475f75 (patch) | |
| tree | 28a503ec8815d22d019f6971a4a5595e696215be /dev-tools/exampleDracutModule | |
| parent | update rebash (log file support) (diff) | |
| parent | Improve openslx config file. (diff) | |
| download | systemd-init-f788dbdbe414089a728be044b2603dc3db475f75.tar.gz systemd-init-f788dbdbe414089a728be044b2603dc3db475f75.tar.xz systemd-init-f788dbdbe414089a728be044b2603dc3db475f75.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/systemd-init
Diffstat (limited to 'dev-tools/exampleDracutModule')
| -rwxr-xr-x | dev-tools/exampleDracutModule/apply-package.sh | 8 | ||||
| -rwxr-xr-x | dev-tools/exampleDracutModule/module-setup.sh | 41 |
2 files changed, 49 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..218740ef --- /dev/null +++ b/dev-tools/exampleDracutModule/apply-package.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +source /etc/openslx + +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..bfe216e7 --- /dev/null +++ b/dev-tools/exampleDracutModule/module-setup.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- + +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd '../' && \ + cd *'dnbd3-rootfs/scripts/rebash' && pwd)/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" +} |
