Skip to content

Commit

Permalink
rc: hook up recover script on bootup
Browse files Browse the repository at this point in the history
Must move the git mount up to test this properly.
  • Loading branch information
fichtner committed Jun 30, 2015
1 parent f4ddcae commit cc71802
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/etc/inc/pfsense-utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -652,10 +652,6 @@ function reload_all_sync() {
/* start the NTP client */
system_ntp_configure();

/* sync pw database */
@unlink('/etc/spwd.db.tmp');
mwexec('/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd');

/* restart sshd */
mwexec_bg('/usr/local/etc/rc.sshd');

Expand Down
17 changes: 8 additions & 9 deletions src/etc/rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ else
done
fi

# mount repo if available
if [ -d /root/core ]; then
make -C /root/core mount
fi

# regenerate groups and users
/usr/local/etc/rc.recover > /dev/null

# rewrite message of the day
/etc/rc.d/motd onestart

Expand All @@ -85,11 +93,6 @@ if [ -d "/cf/conf" ]; then
fi
# !!! migration code for OPNsense <= 15.1.7, do not remove !!!

# mount repo if available
if [ -d /root/core ]; then
make -C /root/core mount
fi

# set up config directory structure
mkdir -p /conf/backup
mkdir -p /conf/sshd
Expand Down Expand Up @@ -130,10 +133,6 @@ if [ "$CDDEVICE" != "" ]; then
cdcontrol -f /dev/"$CDDEVICE" eject
fi

# sync pw database after mount.
rm -f /etc/spwd.db.tmp
/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd

# Enable console output if its muted.
/sbin/conscontrol mute off >/dev/null

Expand Down

0 comments on commit cc71802

Please sign in to comment.