summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-07-25 10:58:21 -0400
committerjim-p <jimp@pfsense.org>2011-07-25 11:02:43 -0400
commitba8366d5b6f50cf12172bbc24f893071c6b2b714 (patch)
tree3c3b5a55282c0c12c0988111e5538acba1f2f0a7 /etc/rc
parentc8950140fde7a43a69871604833bb15e2dedc7b0 (diff)
downloadpfsense-ba8366d5b6f50cf12172bbc24f893071c6b2b714.zip
pfsense-ba8366d5b6f50cf12172bbc24f893071c6b2b714.tar.gz
Sync password database right after mount, in case it is corrupt. (Except on CD-ROM platform).
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index 8b807c9..0dd6946 100755
--- a/etc/rc
+++ b/etc/rc
@@ -88,6 +88,12 @@ if grep -q cf /etc/fstab; then
(/sbin/umount /cf; /sbin/fsck -fy /cf; /sbin/mount -w /cf)
fi
+# sync pw database after mount.
+if [ ! "$PLATFORM" = "cdrom" ] ; then
+ rm -f /etc/spwd.db.tmp
+ /usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd
+fi
+
product=`/usr/bin/grep product_name /etc/inc/globals.inc | /usr/bin/cut -d'"' -f4`
hideplatform=`/usr/bin/grep hideplatform /etc/inc/globals.inc | /usr/bin/wc -l`
varrunpath=`/usr/bin/grep varrun_path /etc/inc/globals.inc | /usr/bin/cut -d'"' -f4`
OpenPOWER on IntegriCloud