blob: b465f5500868309e924cbc832419b6a2be8af5b9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
# $Wintelcom: src/freebsd/pxe/doc/post,v 1.1 2000/07/14 12:42:05 bright Exp $
# $FreeBSD$
echo post-install
set PATH=/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin:/usr/bin/X11
export PATH
# do timezone
cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
conf="/etc/rc.conf.local"
rm $conf
echo 'sendmail_enable="NO"' >> $conf
echo 'dumpdev="/dev/ad0s1b"' >> $conf
echo 'sshd_enable="YES"' >> $conf
echo 'linux_enable="YES"' >> $conf
# set up IP address and hostname
if=`ifconfig fxp1 inet | grep '[ ]*inet' | sed 's/[ ]*//'`
echo "ifconfig_fxp1=\"${if}\"" >> $conf
name=`echo $if | sed 's/[ ][ ]*/ /g' | cut -f2 -d" " | cut -f4 -d.`
echo "hostname=\"suyy${name}\"" >> $conf
echo "network_interfaces=\"fxp0 fxp1 lo0\"" >> $conf
# set up gateway, parse netstat output
gw=`netstat -rn | grep '^default' | sed 's/[ ][ ]*/ /g' | cut -f2 -d" "`
echo "defaultrouter=\"${gw}\"" >> $conf
pwd_mkdb -p /etc/master.passwd
exit 0
|