diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0')
4 files changed, 5 insertions, 5 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh index dfee2afaa..02f0351fc 100755 --- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh +++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh @@ -69,7 +69,7 @@ fi # before fsck, since fsck can be quite memory-hungry. # test "$VERBOSE" != no && echo "Activating swap" -swapon -a 2> /dev/null +[ -x /sbin/swapon ] && swapon -a # # Check the root filesystem. diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh index a97b0681e..2b9eba64c 100644..100755 --- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh +++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh @@ -8,8 +8,8 @@ ### END INIT INFO if [ -f /var/log/dmesg ]; then - if [ -f /usr/sbin/logrotate ]; then - logrotate -f /etc/logrotate-dmesg.conf + if LOGPATH=$(which logrotate); then + $LOGPATH -f /etc/logrotate-dmesg.conf else mv -f /var/log/dmesg /var/log/dmesg.old fi diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh index 94bae420c..c719be5d9 100755 --- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh +++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh @@ -33,7 +33,7 @@ kill -USR1 1 # Execute swapon command again, in case we want to swap to # a file on a now mounted filesystem. # -swapon -a 2> /dev/null +[ -x /sbin/swapon ] && swapon -a : exit 0 diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs index 61324c630..7fb5c58b3 100755 --- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs +++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs @@ -12,7 +12,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin echo "Deactivating swap..." -swapoff -a +[ -x /sbin/swapoff ] && swapoff -a # We leave /proc mounted. echo "Unmounting local filesystems..." |