View | Details | Raw Unified | Return to bug 31327 | Differences between
and this patch

Collapse All | Expand All

(-)rc.diskless1 (-2 / +32 lines)
Lines 93-105 Link Here
93
done
93
done
94
echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}"
94
echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}"
95
95
96
# If there is a global system configuration file, suck it in.
97
#
98
if [ -r /etc/defaults/rc.conf ]; then
99
	. /etc/defaults/rc.conf
100
	source_rc_confs
101
elif [ -r /etc/rc.conf ]; then
102
	. /etc/rc.conf
103
fi
96
104
97
# Create an MFS /tmp to temporarily hold files from /etc until we
105
# Sync password files with server (step 1)
98
# can bootstrap /etc as an MFS.
106
# Warning: variable sync_diskless_pw must be set via server's rc.conf.
107
#
108
case ${diskless_sync_pw} in
109
[Yy][Ee][Ss])
110
	mount_md 4096 /var 0
111
	chkerr $? "MFS mount on temporary /var"
99
112
113
	for pwfile in passwd master.passwd pwd.db spwd.db ; do
114
		/bin/cp -p /etc/$pwfile /var
115
	done
116
        ;;
117
esac
118
119
# Create own /etc
120
#
100
mount_md 4096 /etc 0
121
mount_md 4096 /etc 0
101
chkerr $? "MFS mount on /etc"
122
chkerr $? "MFS mount on /etc"
102
/bin/chmod 755 /etc
123
/bin/chmod 755 /etc
124
125
# Sync password files with server (step 2).
126
#
127
case ${diskless_sync_pw} in
128
[Yy][Ee][Ss])
129
	/bin/cp -p /var/* /etc
130
	/sbin/umount /var
131
        ;;
132
esac
103
133
104
/bin/cp -Rp /conf/default/etc/* /etc
134
/bin/cp -Rp /conf/default/etc/* /etc
105
chkerr $? "cp /conf/default/etc to /etc MFS"
135
chkerr $? "cp /conf/default/etc to /etc MFS"

Return to bug 31327