#!/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"
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
# 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
# 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
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