summaryrefslogtreecommitdiffstats
path: root/infest/etc_aggressive
diff options
context:
space:
mode:
authortv <tv@also>2011-05-26 12:32:55 +0200
committertv <tv@also>2011-05-26 12:32:55 +0200
commitb0555ffa2f6fa2f416bbb2a293ebf43846cf0234 (patch)
treea3834064f5ca28bbf75e94358a2f93579bf22915 /infest/etc_aggressive
parent4a4771f4f95d1b3c62620b0ccec13822b5c293e1 (diff)
infest/etc_aggressive: nicer greps
Diffstat (limited to 'infest/etc_aggressive')
-rwxr-xr-xinfest/etc_aggressive10
1 files changed, 4 insertions, 6 deletions
diff --git a/infest/etc_aggressive b/infest/etc_aggressive
index f0003aa5..c21f5d16 100755
--- a/infest/etc_aggressive
+++ b/infest/etc_aggressive
@@ -22,12 +22,10 @@ echo 'krebs:x:0:' >>$f
# TMPFS for tmp and log
-if [ ! "`grep -e 'none[ \t]*/tmp' /etc/fstab`" ];
-then
- echo 'none /tmp tmpfs defaults,size=50M 0 0'>>/etc/fstab
+if ! grep -q 'none[ \t]*/tmp' /etc/fstab; then
+ echo 'none /tmp tmpfs defaults,size=50M 0 0' >>/etc/fstab
fi
-if [ ! "`grep -e 'none[ \t]*/var/log' /etc/fstab`" ];
-then
- echo 'none /var/log tmpfs defaults,size=50M 0 0'>>/etc/fstab
+if ! grep -q 'none[ \t]*/var/log' /etc/fstab; then
+ echo 'none /var/log tmpfs defaults,size=50M 0 0' >>/etc/fstab
fi