ln_r $systemdutildir/systemd "/sbin/init"
inst_binary true
- ln_r $(type -P true) "/usr/bin/loginctl"
- ln_r $(type -P true) "/bin/loginctl"
+ ln_r $(find_binary true) "/usr/bin/loginctl"
+ ln_r $(find_binary true) "/bin/loginctl"
inst_rules \
70-uaccess.rules \
71-seat.rules \
install() {
if ! dracut_module_included "systemd"; then
inst_hook pre-pivot 00 "$moddir/caps.sh"
- inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
+ inst $(find_binary capsh 2>/dev/null) /usr/sbin/capsh
# capsh wants bash and we need bash also
inst /bin/bash
else
install() {
local _i _path _busybox
local _progs=()
- _busybox=$(type -P busybox)
+ _busybox=$(find_binary busybox)
inst $_busybox /usr/bin/busybox
for _i in $($_busybox --list); do
[[ ${_i} == busybox ]] && continue
return ${_ret}
}
- type -P splash_geninitramfs >/dev/null || return 1
+ find_binary splash_geninitramfs >/dev/null || return 1
_opts=''
if [[ ${DRACUT_GENSPLASH_THEME} ]]; then
pkglib_dir() {
local _dirs="/usr/lib/plymouth /usr/libexec/plymouth/"
- if type -P dpkg-architecture &>/dev/null; then
+ if find_binary dpkg-architecture &>/dev/null; then
_dirs+=" /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth"
fi
for _dir in $_dirs; do
inst_libdir_file "libdevmapper-event-lvm*.so"
- if [[ $hostonly ]] && type -P lvs &>/dev/null; then
+ if [[ $hostonly ]] && find_binary lvs &>/dev/null; then
for dev in "${!host_fs_types[@]}"; do
[ -e /sys/block/${dev#/dev/}/dm/name ] || continue
dev=$(</sys/block/${dev#/dev/}/dm/name)
install() {
local _i
local _installs
- if type -P rsyslogd >/dev/null; then
+ if find_binary rsyslogd >/dev/null; then
_installs="rsyslogd"
inst_libdir_file rsyslog/lmnet.so rsyslog/imklog.so rsyslog/imuxsock.so rsyslog/imjournal.so
- elif type -P syslogd >/dev/null; then
+ elif find_binary syslogd >/dev/null; then
_installs="syslogd"
- elif type -P syslog-ng >/dev/null; then
+ elif find_binary syslog-ng >/dev/null; then
_installs="syslog-ng"
else
derror "Could not find any syslog binary although the syslogmodule" \
#!/bin/bash
check() {
- if type -P memstrack >/dev/null; then
+ if find_binary memstrack >/dev/null; then
dinfo "memstrack is available"
return 0
fi
return 1
fi
- if ! type -P mksquashfs >/dev/null || ! type -P unsquashfs >/dev/null ; then
+ if ! find_binary mksquashfs >/dev/null || ! find_binary unsquashfs >/dev/null ; then
derror "dracut-squash module requires squashfs-tools"
return 1
fi