File: module-setup.sh

package info (click to toggle)
dracut 109-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,592 kB
  • sloc: sh: 24,498; ansic: 5,234; makefile: 346; perl: 186; python: 48; javascript: 19
file content (25 lines) | stat: -rwxr-xr-x 547 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later

# Module dependency requirements.

# due to the dependencies below, this dracut module needs to be ordered later than the bash, dash and busybox dracut modules

depends() {
    # priority order
    shells='bash dash busybox'

    for shell in $shells; do
        if dracut_module_included "$shell"; then
            echo "$shell"
            return 0
        fi
    done

    shell=$(realpath /bin/sh)
    shell=${shell##*/}

    echo "$shell"
    return 0
}