File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # This file is part of dracut.
3+ # SPDX-License-Identifier: GPL-2.0-or-later
24
3- # called by dracut
5+ # Prerequisite check(s) for module.
46check () {
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+
614}
715
8- # called by dracut
16+ # Module dependency requirements.
917depends () {
18+
19+ # Return 0 to include the dependent module(s) in the initramfs.
1020 return 0
21+
1122}
1223
13- # called by dracut
24+ # Install the required file(s) and directories for the module in the initramfs.
1425install () {
15- # If another shell is already installed, do not use dash
16- [[ -x $initdir /bin/sh ]] && return
1726
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+
2032}
You can’t perform that action at this time.
0 commit comments