From: Harald Hoyer Date: Thu, 20 Sep 2012 08:26:14 +0000 (+0200) Subject: dash compat: use "2>&1" rather than "&>" X-Git-Tag: 024~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa09b74a412d5511b533b6d22da51868518ef138;p=thirdparty%2Fdracut.git dash compat: use "2>&1" rather than "&>" --- diff --git a/modules.d/04watchdog/watchdog.sh b/modules.d/04watchdog/watchdog.sh index a3fdc265d..14c92aa55 100755 --- a/modules.d/04watchdog/watchdog.sh +++ b/modules.d/04watchdog/watchdog.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ -e /dev/watchdog ]; then if [ ! -e /tmp/watchdog_timeout ]; then - wdctl -s 60 /dev/watchdog &>/dev/null + wdctl -s 60 /dev/watchdog >/dev/null 2>&1 > /tmp/watchdog_timeout fi info "Triggering watchdog" diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh index 611922611..3c3f0576f 100755 --- a/modules.d/90mdraid/module-setup.sh +++ b/modules.d/90mdraid/module-setup.sh @@ -66,10 +66,10 @@ install() { inst_rules "$moddir/65-md-incremental-imsm.rules" # guard against pre-3.0 mdadm versions, that can't handle containers - if ! mdadm -Q -e imsm /dev/null &> /dev/null; then + if ! mdadm -Q -e imsm /dev/null >/dev/null 2>&1; then inst_hook pre-trigger 30 "$moddir/md-noimsm.sh" fi - if ! mdadm -Q -e ddf /dev/null &> /dev/null; then + if ! mdadm -Q -e ddf /dev/null >/dev/null 2>&1; then inst_hook pre-trigger 30 "$moddir/md-noddf.sh" fi diff --git a/modules.d/90qemu-net/module-setup.sh b/modules.d/90qemu-net/module-setup.sh index e6172303f..522a7b5a5 100755 --- a/modules.d/90qemu-net/module-setup.sh +++ b/modules.d/90qemu-net/module-setup.sh @@ -3,8 +3,8 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh check() { - if type -P systemd-detect-virt &>/dev/null; then - vm=$(systemd-detect-virt --vm &>/dev/null) + if type -P systemd-detect-virt >/dev/null 2>&1; then + vm=$(systemd-detect-virt --vm >/dev/null 2>&1) (($? != 0)) && return 255 [[ $vm = "qemu" ]] && return 0 [[ $vm = "kvm" ]] && return 0 diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh index fc258ac85..0dbf0818d 100755 --- a/modules.d/90qemu/module-setup.sh +++ b/modules.d/90qemu/module-setup.sh @@ -3,8 +3,8 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh check() { - if type -P systemd-detect-virt &>/dev/null; then - vm=$(systemd-detect-virt --vm &>/dev/null) + if type -P systemd-detect-virt >/dev/null 2>&1; then + vm=$(systemd-detect-virt --vm >/dev/null 2>&1) (($? != 0)) && return 255 [[ $vm = "qemu" ]] && return 0 [[ $vm = "kvm" ]] && return 0 diff --git a/modules.d/96securityfs/securityfs.sh b/modules.d/96securityfs/securityfs.sh index 03ee4dda5..f6f4b77e0 100755 --- a/modules.d/96securityfs/securityfs.sh +++ b/modules.d/96securityfs/securityfs.sh @@ -5,6 +5,6 @@ SECURITYFSDIR="/sys/kernel/security" export SECURITYFSDIR -if ! ismounted "${SECURITYFSDIR}"; then +if ! findmnt "${SECURITYFSDIR}" >/dev/null 2>&1; then mount -t securityfs -o nosuid,noexec,nodev securityfs ${SECURITYFSDIR} >/dev/null 2>&1 fi