1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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.
This commit is contained in:
Warner Losh 1996-09-22 06:36:49 +00:00
parent 9986e07e1f
commit b604753497
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18460

4
etc/rc
View File

@ -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