summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1996-09-22 06:36:49 +0000
committerimp <imp@FreeBSD.org>1996-09-22 06:36:49 +0000
commit955d71703a4a3eee403170783eea5c80dbf6bac9 (patch)
treec0aad198a62ee0ece91ba6f037b5337934ba5457 /etc
parent1e159b65f18d882411fd076d5986fda215489c81 (diff)
downloadFreeBSD-src-955d71703a4a3eee403170783eea5c80dbf6bac9.zip
FreeBSD-src-955d71703a4a3eee403170783eea5c80dbf6bac9.tar.gz
Fix a possible syntax error in rc when swapfile isn't defined at all.
This can happen when the user is upgrading from an older version and his/her sysconfig file doesn't have swapfile defined to be NO in it.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index 1724964..329b3ea 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: rc,v 1.97 1996/08/21 23:15:36 jkh Exp $
+# $Id: rc,v 1.98 1996/09/02 13:09:54 phk Exp $
# From: @(#)rc 5.27 (Berkeley) 6/5/91
# System startup script run by init on autoboot
@@ -92,7 +92,7 @@ if [ -f /etc/sysconfig ]; then
fi
# Add additional swapfile, if configured.
-if [ "x$swapfile" != "xNO" -a -w $swapfile -a -f /dev/vn0b ]; then
+if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -f /dev/vn0b ]; then
echo "Adding $swapfile as additional swap."
/usr/sbin/vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
fi
OpenPOWER on IntegriCloud