From aa09b74a412d5511b533b6d22da51868518ef138 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 20 Sep 2012 10:26:14 +0200 Subject: [PATCH] dash compat: use "2>&1" rather than "&>" --- modules.d/04watchdog/watchdog.sh | 2 +- modules.d/90mdraid/module-setup.sh | 4 ++-- modules.d/90qemu-net/module-setup.sh | 4 ++-- modules.d/90qemu/module-setup.sh | 4 ++-- modules.d/96securityfs/securityfs.sh | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules.d/04watchdog/watchdog.sh b/modules.d/04watchdog/watchdog.sh index a3fdc265..14c92aa5 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 61192261..3c3f0576 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 e6172303..522a7b5a 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 fc258ac8..0dbf0818 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 03ee4dda..f6f4b77e 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