#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ] || [ -z "$fipsmode" ]; then
# Do nothing if not in FIPS mode
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then
:
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then
:
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then
:
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
# systemd lets stdout go to journal only, but the system
# has to halt when the integrity check fails to satisfy FIPS.
#!/bin/sh
-type getcmdline > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getcmdline > /dev/null || . /lib/dracut-lib.sh
# Just in case we're running before it
systemctl start systemd-network-generator.service
#!/bin/bash
-type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v source_hook > /dev/null || . /lib/dracut-lib.sh
for ifpath in /sys/class/net/*; do
ifname="${ifpath##*/}"
#!/bin/bash
-type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v ismounted > /dev/null || . /lib/dracut-lib.sh
ROOT="$1"
#!/bin/sh
-type cm_generate_connections > /dev/null 2>&1 || . /lib/cm-lib.sh
+command -v cm_generate_connections > /dev/null || . /lib/cm-lib.sh
if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
echo rd.neednet >> /etc/cmdline.d/connman.conf
#!/bin/sh
-type getcmdline > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getcmdline > /dev/null || . /lib/dracut-lib.sh
cm_generate_connections() {
if getargbool 0 rd.neednet; then
#!/bin/bash
-type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v source_hook > /dev/null || . /lib/dracut-lib.sh
if [ -e /tmp/cm.done ]; then
return
PATH=/usr/sbin:/usr/bin:/sbin:/bin
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type ip_to_var > /dev/null 2>&1 || . /lib/net-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v ip_to_var > /dev/null || . /lib/net-lib.sh
# We already need a set netif here
netif=$interface
# File to start dhclient requests on different interfaces in parallel
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
. /lib/net-lib.sh
netif=$1
# or it is for manually bring up network ie. for kdump scp vmcore
PATH=/usr/sbin:/usr/bin:/sbin:/bin
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type ip_to_var > /dev/null 2>&1 || . /lib/net-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v ip_to_var > /dev/null || . /lib/net-lib.sh
# Huh? No $1?
[ -z "$1" ] && exit 1
#!/bin/sh
-type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh
+command -v nm_generate_connections > /dev/null || . /lib/nm-lib.sh
if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
echo rd.neednet >> /etc/cmdline.d/35-neednet.conf
#!/bin/sh
-type getcmdline > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getcmdline > /dev/null || . /lib/dracut-lib.sh
nm_generate_connections() {
rm -f /run/NetworkManager/system-connections/*
#!/bin/bash
-type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v source_hook > /dev/null || . /lib/dracut-lib.sh
if [ -z "$DRACUT_SYSTEMD" ]; then
# Only start NM if networking is needed
# Authors:
# Will Woods <wwoods@redhat.com>
-type mkuniqdir > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v mkuniqdir > /dev/null || . /lib/dracut-lib.sh
# fetch_url URL [OUTFILE]
# fetch the given URL to a locally-visible location.
#!/bin/bash
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
OLD_UMASK=$(umask)
umask 0022
#!/bin/bash
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
DEVICE=$1
echo "$IFACES" >> /tmp/net.ifaces
if [ -x /usr/libexec/nm-initrd-generator ] || [ -x /usr/lib/nm-initrd-generator ]; then
- type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh
+ command -v nm_generate_connections > /dev/null || . /lib/nm-lib.sh
nm_generate_connections
nm_reload_connections
else
#!/bin/bash
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type zdev_parse_dasd_list > /dev/null 2>&1 || . /lib/s390-tools/zdev-from-dasd_mod.dasd
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v zdev_parse_dasd_list > /dev/null || . /lib/s390-tools/zdev-from-dasd_mod.dasd
function dasd_settle() {
local dasd_status
#!/bin/bash
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
do_merge() {
sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 1/' \
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
LVS=$(getargs rd.lvm.lv)
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
btrfs_check_complete() {
local _rootinfo _dev
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
btrfs_check_complete() {
local _rootinfo _dev
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
info "Scanning for all btrfs devices"
/sbin/btrfs device scan > /dev/null 2>&1
#!/bin/sh
-type getargs > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type crypttab_contains > /dev/null 2>&1 || . /lib/dracut-crypt-lib.sh
+command -v getargs > /dev/null || . /lib/dracut-lib.sh
+command -v crypttab_contains > /dev/null || . /lib/dracut-crypt-lib.sh
dev=$1
luks=$2
# do not ask, if we already have root
[ -f "$NEWROOT"/proc ] && exit 0
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
mkdir -p -m 0700 /run/cryptsetup
#!/bin/sh
-type crypttab_contains > /dev/null 2>&1 || . /lib/dracut-crypt-lib.sh
+command -v crypttab_contains > /dev/null || . /lib/dracut-crypt-lib.sh
_cryptgetargsname() {
debug_off
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
devenc=$(str_replace "$1" '/' '\2f')
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if getargbool 0 rd.live.debug; then
exec > /tmp/create-overlay.$$.out
#!/bin/sh
-type vwarn > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v vwarn > /dev/null || . /lib/dracut-lib.sh
# Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot
# at the first glance, but ends with lots and lots of squashfs
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
[ -z "$root" ] && root=$(getarg root=)
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type det_fs > /dev/null 2>&1 || . /lib/fs-lib.sh
-
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v det_fs > /dev/null || . /lib/fs-lib.sh
command -v unpack_archive > /dev/null || . /lib/img-lib.sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
#!/bin/sh
-type getargs > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getargs > /dev/null || . /lib/dracut-lib.sh
for modlist in $(getargs rd.driver.post); do
(
#!/bin/bash
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
[ -z "$root" ] && root=$(getarg root=)
#!/bin/sh
# livenetroot - fetch a live image from the network and run it
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type fetch_url > /dev/null 2>&1 || . /lib/url-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v fetch_url > /dev/null || . /lib/url-lib.sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
RETRIES=${RETRIES:-100}
# run lvm scan if udev has settled
extraargs="$*"
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
VGS=$(getargs rd.lvm.vg)
LVS=$(getargs rd.lvm.lv)
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
containers=""
for md in /dev/md[0-9_]*; do
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
for md in /dev/md[0-9_]*; do
[ -b "$md" ] || continue
#!/bin/sh
if getargbool 0 rd.md.waitclean; then
- type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+ command -v getarg > /dev/null || . /lib/dracut-lib.sh
containers=""
for md in /dev/md[0-9_]*; do
[ -b "$md" ] || continue
#!/bin/sh
-type getargs > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getargs > /dev/null || . /lib/dracut-lib.sh
_md_start() {
local _udevinfo
#!/bin/sh
-type need_shutdown > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v need_shutdown > /dev/null || . /lib/dracut-lib.sh
for i in $(multipath -l -v1); do
if dmsetup table "$i" | sed -n '/.*queue_if_no_path.*/q1'; then
#!/bin/sh
-type pidof > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v pidof > /dev/null || . /lib/dracut-lib.sh
if [ -e /etc/multipath.conf ]; then
pkill multipathd > /dev/null 2>&1
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if [ "$(getarg rd.multipath)" = "default" ] && [ ! -e /etc/multipath.conf ]; then
# mpathconf requires /etc/multipath to already exist
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
getargbool 0 rd.live.overlay.overlayfs && overlayfs="yes"
getargbool 0 rd.live.overlay.readonly && readonly_overlay="--readonly" || readonly_overlay=""
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
getargbool 0 rd.live.overlay.overlayfs && overlayfs="yes"
getargbool 0 rd.live.overlay.reset && reset_overlay="yes"
# CIFSROOT is something like: cifs://[<username>[:<password>]]@<host>/<path>
# NETIF is used to get information from DHCP options, if needed.
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
cifs_to_var() {
local cifsuser
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type cifs_to_var > /dev/null 2>&1 || . /lib/cifs-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v cifs_to_var > /dev/null || . /lib/cifs-lib.sh
[ "$#" = 3 ] || exit 1
# respectively.
#
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type cifs_to_var > /dev/null 2>&1 || . /lib/cifs-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v cifs_to_var > /dev/null || . /lib/cifs-lib.sh
# This script is sourced, so root should be set. But let's be paranoid
[ -z "$root" ] && root=$(getarg root=)
# future use.
PATH=/usr/sbin:/usr/bin:/sbin:/bin
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type ip_to_var > /dev/null 2>&1 || . /lib/net-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v ip_to_var > /dev/null || . /lib/net-lib.sh
# Huh? Missing arguments ??
[ -z "$1" ] || [ -z "$2" ] && exit 1
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type det_fs > /dev/null 2>&1 || . /lib/fs-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v det_fs > /dev/null || . /lib/fs-lib.sh
fstab_mount() {
local _dev _mp _fs _opts _pass
# iscsistart needs this.
#
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type parse_iscsi_root > /dev/null 2>&1 || . /lib/net-lib.sh
-type write_fs_tab > /dev/null 2>&1 || . /lib/fs-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v parse_iscsi_root > /dev/null || . /lib/net-lib.sh
+command -v write_fs_tab > /dev/null || . /lib/fs-lib.sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
[ -n "$iscsiroot" ] && [ -n "$iscsi_firmware" ] && die "Mixing iscsiroot and iscsi_firmware is dangerous"
-type write_fs_tab > /dev/null 2>&1 || . /lib/fs-lib.sh
+command -v write_fs_tab > /dev/null || . /lib/fs-lib.sh
# Root takes precedence over netroot
if [ "${root%%:*}" = "iscsi" ]; then
for nroot in $(getargs netroot); do
[ "${nroot%%:*}" = "iscsi" ] || continue
- type parse_iscsi_root > /dev/null 2>&1 || . /lib/net-lib.sh
+ command -v parse_iscsi_root > /dev/null || . /lib/net-lib.sh
parse_iscsi_root "$nroot" || return 1
netroot_enc=$(str_replace "$nroot" '/' '\2f')
echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-$netroot_enc' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
[ -z "$root" ] && root=$(getarg root=)
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
wait_for_dev -n /dev/root
if [ -z "$DRACUT_SYSTEMD" ]; then
- type write_fs_tab > /dev/null 2>&1 || . /lib/fs-lib.sh
+ command -v write_fs_tab > /dev/null || . /lib/fs-lib.sh
write_fs_tab /dev/root "$nbdfstype" "$fsopts"
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type get_ip > /dev/null 2>&1 || . /lib/net-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v get_ip > /dev/null || . /lib/net-lib.sh
# TODO: make these things not pollute the calling namespace
#!/bin/sh
-type incol2 > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v incol2 > /dev/null || . /lib/dracut-lib.sh
[ -f /tmp/nfs.rpc_pipefs_path ] && read -r rpcpipefspath < /tmp/nfs.rpc_pipefs_path
[ -z "$rpcpipefspath" ] && rpcpipefspath=var/lib/nfs/rpc_pipefs
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type nfs_to_var > /dev/null 2>&1 || . /lib/nfs-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v nfs_to_var > /dev/null || . /lib/nfs-lib.sh
[ "$#" = 3 ] || exit 1
# NFSv3 is used.
#
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
. /lib/nfs-lib.sh
# This script is sourced, so root should be set. But let's be paranoid
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type det_fs > /dev/null 2>&1 || . /lib/fs-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
+command -v det_fs > /dev/null || . /lib/fs-lib.sh
mount_root() {
local _rflags_ro
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
for root in $(getargs rootfallback=); do
root=$(label_uuid_to_dev "$root")
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
filter_rootopts() {
rootopts=$1
#!/bin/sh
-type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v ismounted > /dev/null || . /lib/dracut-lib.sh
if [ "${fstype}" = "virtiofs" ] || [ "${root%%:*}" = "virtiofs" ]; then
if ! load_fstype virtiofs; then
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
getarg "rd.cmdline=ask" || exit 0
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release
[ -n "$DRACUT_VERSION" ] && info "dracut-$DRACUT_VERSION"
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
source_conf /etc/conf.d
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
source_conf /etc/conf.d
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
source_conf /etc/conf.d
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
source_conf /etc/conf.d
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
source_conf /etc/conf.d
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
source_conf /etc/conf.d
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2> /dev/null
fi
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
source_conf /etc/conf.d
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
root=$(getarg root=)
case "${root#block:}" in
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
generator_wait_for_dev() {
local _name
#sysloglevel=level What level has to be logged
#syslogtype=rsyslog|syslog|syslogng
# Don't auto detect syslog but set it
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
detect_syslog() {
syslogtype=""
# Triggered by initqueue/online and starts rsyslogd with bootparameters
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
# prevent starting again if already running
if [ -f /var/run/syslogd.pid ]; then
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
# Kills rsyslogd
# Just cleans up a previously started syslogd
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if [ -f /tmp/syslog.server ]; then
read -r syslogtype < /tmp/syslog.type
#!/bin/sh
-type info > /dev/null 2>&1 || . /lib/dracut-lib.sh
-type fsck_single > /dev/null 2>&1 || . /lib/fs-lib.sh
+command -v info > /dev/null || . /lib/dracut-lib.sh
+command -v fsck_single > /dev/null || . /lib/fs-lib.sh
filtersubvol() {
local _oldifs
#!/bin/sh
-type wait_for_dev > /dev/null 2>&1 || . /lib/dracut-dev-lib.sh
+command -v wait_for_dev > /dev/null || . /lib/dracut-dev-lib.sh
export DRACUT_SYSTEMD
export NEWROOT
}
# pidof version for root
-if ! command -v pidof > /dev/null 2> /dev/null; then
+if ! command -v pidof > /dev/null; then
pidof() {
debug_off
local _cmd
fi
RD_DEBUG=""
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
setdebug
PATH=/usr/sbin:/usr/bin:/sbin:/bin
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
while [ $# -gt 0 ]; do
case "$1" in
#!/bin/sh
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
fsck_ask_reboot() {
info "note - fsck suggests reboot, if you"
local _ret
local _out
- [ $# -eq 0 ] || ! type fsck > /dev/null 2>&1 && return 255
+ [ $# -eq 0 ] || ! command -v fsck > /dev/null && return 255
info "Checking filesystems (fsck -M -T -a):"
for _dev in "$@"; do
# memdebug=4 and memdebug=5 requires debug fs to be mounted.
# And there is no need to umount it.
-type getargnum > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getargnum > /dev/null || . /lib/dracut-lib.sh
# "sys/kernel/tracing" has the priority if exists.
get_trace_base() {
export TERM=linux
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
-type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then
mount -o remount,rw /