File tree 1 file changed +20
-8
lines changed
1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+ # This file is part of dracut.
3
+ # SPDX-License-Identifier: GPL-2.0-or-later
2
4
3
- # called by dracut
5
+ # Prerequisite check(s) for module.
4
6
check () {
5
- require_binaries /bin/dash
7
+
8
+ # If the binary(s) requirements are not fulfilled the module can't be installed.
9
+ require_binaries dash || return 1
10
+
11
+ # Return 255 to only include the module, if another module requires it.
12
+ return 255
13
+
6
14
}
7
15
8
- # called by dracut
16
+ # Module dependency requirements.
9
17
depends () {
18
+
19
+ # Return 0 to include the dependent module(s) in the initramfs.
10
20
return 0
21
+
11
22
}
12
23
13
- # called by dracut
24
+ # Install the required file(s) and directories for the module in the initramfs.
14
25
install () {
15
- # If another shell is already installed, do not use dash
16
- [[ -x $initdir /bin/sh ]] && return
17
26
18
- # Prefer dash as /bin/sh if it is available.
19
- inst /bin/dash && ln -sf dash " ${initdir} /bin/sh"
27
+ inst /bin/dash
28
+
29
+ # Prefer dash as default shell if no other shell is preferred.
30
+ [[ -L $initdir /bin/sh ]] || ln -sf dash " ${initdir} /bin/sh"
31
+
20
32
}
You can’t perform that action at this time.
0 commit comments