From 171da3d79b0494af47e8c8c3815e8abec385b7d3 Mon Sep 17 00:00:00 2001 From: "Kurt J. Bosch" Date: Fri, 24 Jun 2011 10:56:31 +0200 Subject: Some more cosmetics --- functions | 4 ++-- rc.shutdown | 2 +- rc.sysinit | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/functions b/functions index d57fe16..a29eb7f 100644 --- a/functions +++ b/functions @@ -32,7 +32,7 @@ calc_columns () { fi # we use 13 characters for our own stuff - STAT_COL=$(( $STAT_COL - 13 )) + STAT_COL=$(( STAT_COL - 13 )) if [[ -t 1 ]]; then SAVE_POSITION="\e[s" @@ -154,7 +154,7 @@ stat_die() { status() { stat_busy "$1" shift - if "$@" >/dev/null 2>&1; then + if "$@" &>/dev/null; then stat_done return 0 fi diff --git a/rc.shutdown b/rc.shutdown index b0b97d6..473953f 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -26,7 +26,7 @@ RANDOM_SEED=/var/lib/misc/random-seed install -TDm 0600 <(:) $RANDOM_SEED POOL_FILE=/proc/sys/kernel/random/poolsize if [[ -r $POOL_FILE ]]; then - read POOL_SIZE <$POOL_FILE + read POOL_SIZE < $POOL_FILE else POOL_SIZE=512 fi diff --git a/rc.sysinit b/rc.sysinit index 5167a14..52d9d4b 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -244,8 +244,7 @@ if [[ -f $RANDOM_SEED ]]; then fi stat_busy "Removing Leftover Files" - rm -rf /etc/{nologin,shutdownpid} /forcefsck &>/dev/null - rm -rf /tmp/* /tmp/.* &>/dev/null + rm -rf /etc/{nologin,shutdownpid} /forcefsck /tmp/* /tmp/.* [[ ! -L /var/lock ]] && rm -rf /var/lock/* [[ ! -L /var/run && -d /var/run ]] && find /var/run/ \! -type d -delete [[ ! -L /var/run && ! -L /var/run/daemons ]] && @@ -258,7 +257,7 @@ stat_done if [[ $HOSTNAME ]]; then stat_busy "Setting Hostname: $HOSTNAME" - echo $HOSTNAME > /proc/sys/kernel/hostname + echo "$HOSTNAME" > /proc/sys/kernel/hostname stat_done fi @@ -296,7 +295,8 @@ fi # Set console font if required set_consolefont -if [[ -e /proc/sys/kernel/dmesg_restrict && $(< /proc/sys/kernel/dmesg_restrict) -eq 1 ]]; then +if [[ -e /proc/sys/kernel/dmesg_restrict ]] && + (( $(< /proc/sys/kernel/dmesg_restrict) == 1 )); then install -Tm 0600 <( dmesg ) /var/log/dmesg.log else install -Tm 0644 <( dmesg ) /var/log/dmesg.log -- cgit v1.2.3