[arch-projects] [INITSCRIPTS][PATCH 1/6] Using bash built-in cat and case to avoid grep run
Sébastien Luttringer
seblu at seblu.net
Mon Jun 11 17:10:35 EDT 2012
From: Igor M Podlesny <for.poige+archlinux at gmail.com>
Signed-off-by: Sébastien Luttringer <seblu at seblu.net>
---
rc.sysinit | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/rc.sysinit b/rc.sysinit
index 58f3216..c276da7 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -42,9 +42,10 @@ if [[ ! -a /usr/lib ]] ; then
printf "${C_FAIL}/usr is not mounted. This is not supported.${C_OTHER}\n"
fi
-if ! grep -q devtmpfs /proc/filesystems; then
- printf "${C_FAIL}Your kernel does not have devtmpfs support. This is not supported.${C_OTHER}\n"
-fi
+case $(< /proc/filesystems) in
+ *devtmpfs*) ;;
+ *) printf "${C_FAIL}Your kernel does not have devtmpfs support. This is not supported.${C_OTHER}\n" ;;
+esac
HWCLOCK_PARAMS="--systz"
case $HARDWARECLOCK in
--
Sebastien "Seblu" Luttringer
More information about the arch-projects
mailing list