]> git.ipfire.org Git - thirdparty/dracut.git/blame - modules.d/02caps/module-setup.sh
Factor out all the "type -V" commands
[thirdparty/dracut.git] / modules.d / 02caps / module-setup.sh
CommitLineData
529349c6
HH
1#!/bin/bash
2# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3# ex: ts=8 sw=4 sts=4 et filetype=sh
4
8bcfd683 5# called by dracut
529349c6 6check() {
30e6e809 7 require_binaries capsh
529349c6
HH
8}
9
8bcfd683 10# called by dracut
529349c6
HH
11depends() {
12 return 0
13}
14
8bcfd683 15# called by dracut
529349c6 16install() {
30e6e809
HH
17 if ! dracut_module_included "systemd"; then
18 inst_hook pre-pivot 00 "$moddir/caps.sh"
19 inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
20 # capsh wants bash and we need bash also
21 inst /bin/bash
22 else
23 dwarning "caps: does not work with systemd in the initramfs"
24 fi
529349c6
HH
25}
26