version 1.476, 2016/04/27 09:17:53 |
version 1.477, 2016/04/27 14:49:11 |
|
|
done |
done |
} |
} |
|
|
|
run_upgrade_script() { |
|
local _suffix=$1 |
|
[[ -n $_suffix ]] || return 1 |
|
if [[ -f /etc/rc.$_suffix ]]; then |
|
mv /etc/rc.$_suffix /etc/rc.$_suffix.run |
|
. /etc/rc.$_suffix.run 2>&1 | tee /dev/tty | |
|
mail -Es "$(hostname) rc.$_suffix output" root >/dev/null |
|
fi |
|
rm -f /etc/rc.$_suffix.run |
|
} |
|
|
# Check filesystems, optionally by using a fsck(8) flag. |
# Check filesystems, optionally by using a fsck(8) flag. |
# Usage: do_fsck [-flag] |
# Usage: do_fsck [-flag] |
do_fsck() { |
do_fsck() { |
|
|
|
|
echo 'preserving editor files.'; /usr/libexec/vi.recover |
echo 'preserving editor files.'; /usr/libexec/vi.recover |
|
|
|
# If rc.sysmerge exists, run it just once, and make sure it is deleted. |
|
run_upgrade_script sysmerge |
|
|
echo -n 'starting network daemons:' |
echo -n 'starting network daemons:' |
start_daemon ldomd vmd sshd snmpd ldpd ripd ospfd ospf6d bgpd ifstated |
start_daemon ldomd vmd sshd snmpd ldpd ripd ospfd ospf6d bgpd ifstated |
start_daemon relayd dhcpd dhcrelay mrouted dvmrpd radiusd eigrpd |
start_daemon relayd dhcpd dhcrelay mrouted dvmrpd radiusd eigrpd |
|
|
echo '.' |
echo '.' |
|
|
# If rc.firsttime exists, run it just once, and make sure it is deleted. |
# If rc.firsttime exists, run it just once, and make sure it is deleted. |
if [[ -f /etc/rc.firsttime ]]; then |
run_upgrade_script firsttime |
mv /etc/rc.firsttime /etc/rc.firsttime.run |
|
. /etc/rc.firsttime.run 2>&1 | tee /dev/tty | |
|
mail -Es "$(hostname) rc.firsttime output" root >/dev/null |
|
fi |
|
rm -f /etc/rc.firsttime.run |
|
|
|
# Run rc.d(8) scripts from packages. |
# Run rc.d(8) scripts from packages. |
if [[ -n $pkg_scripts ]]; then |
if [[ -n $pkg_scripts ]]; then |