-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfreebsd-base.conf
147 lines (139 loc) · 4.97 KB
/
freebsd-base.conf
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#
. defaults.conf
_fakeroot="$fakeroot"
exclude_files_kernel="/boot/kernel/.*"
exclude_files_lib32="/libexec/ld-elf32.so.1|\
/usr/bin/ldd32|\
/usr/lib32/.*|\
/usr/libexec/ld-elf32.so.1"
exclude_files_pkg_install="/usr/sbin/pkg_.*|\
/usr/share/man/man1/pkg_.*"
exclude_files_rescue="/rescue/.*"
exclude_files_zoneinfo="/usr/share/zoneinfo/.*"
exclude_files="^${_fakeroot}(\
${exclude_files_kernel}|\
${exclude_files_lib32}|\
${exclude_files_pkg_install}|\
${exclude_files_rescue}|\
${exclude_files_zoneinfo}|\
/etc/[^/]*|\
/etc/mail/aliases|\
/etc/pam.d/sshd|\
/etc/ssh/ssh_config|\
/etc/ssh/sshd_config|\
/var/db/locate.database|\
/var/log/sendmail.st|\
/var/named/etc/namedb/named.conf\
)"
exclude_dirs_kernel="/boot/kernel"
exclude_dirs_lib32="/usr/lib32|\
/usr/lib32/.*"
exclude_dirs_rescue="/rescue"
exclude_dirs_zoneinfo="/usr/share/zoneinfo|\
/usr/share/zoneinfo/.*"
exclude_dirs="^${_fakeroot}(\
${exclude_dirs_kernel}|\
${exclude_dirs_lib32}|\
${exclude_dirs_rescue}|\
${exclude_dirs_zoneinfo}|\
/dev|\
/proc|\
/var|\
/var/tmp|\
/var/tmp/vi.recover\
)"
find_files="find -E ${_fakeroot} \( -type f -or -type l \) -and -not -regex \"$exclude_files\""
find_dirs="find -E ${_fakeroot} -type d -and -not -regex \"$exclude_dirs\""
find_size="find -E ${_fakeroot} \( -type f -or -type l \) -and -not -regex \"$exclude_files\" -exec stat -f %z {} \+"
name="freebsd-base"
version="9.0"
origin="local/freebsd-base"
comment="FreeBSD base"
desc="|-
FreeBSD base"
scripts="pre-install: |-
chflags noschg /bin/rcp /lib/libc.so.7 /lib/libcrypt.so.5 /lib/libthr.so.3 /libexec/ld-elf.so.1 /sbin/init /usr/bin/chfn /usr/bin/chpass /usr/bin/chsh /usr/bin/crontab /usr/bin/login /usr/bin/opieinfo /usr/bin/opiepasswd /usr/bin/passwd /usr/bin/rlogin /usr/bin/rsh /usr/bin/su /usr/bin/ypchfn /usr/bin/ypchpass /usr/bin/ypchsh /usr/bin/yppasswd /usr/lib/librt.so.1 /var/empty/ 2> /dev/null
for src in /usr/share/examples/etc/*; do
dst=\${src#/usr/share/examples}
case \$dst in
/etc/README.examples|/etc/bsd-style-copyright|/etc/make.conf|/etc/wpa_supplicant.conf)
continue
;;
esac
if [ -f \$src -a -f \$dst ]; then
if cmp -s \$src \$dst; then
rm -f \$dst
case \$dst in
/etc/login.conf)
rm -f /etc/login.conf.db
;;
/etc/master.passwd)
rm -f /etc/passwd /etc/pwd.db /etc/spwd.db
;;
esac
fi
fi
done
post-install: |-
for d in /dev /proc; do
[ ! -d \$d/ ] && mkdir -m 0555 -p \$d/
done
for d in /var; do
[ ! -d \$d/ ] && mkdir -m 0755 -p \$d/
done
for d in /var/tmp /var/tmp/vi.recover; do
[ ! -d \$d/ ] && mkdir -m 1777 -p \$d/
done
for src in /usr/share/examples/etc/*; do
dst=\${src#/usr/share/examples}
case \$dst in
/etc/README.examples|/etc/bsd-style-copyright|/etc/make.conf|/etc/motd|/etc/wpa_supplicant.conf)
continue
;;
esac
if [ -f \$src -a ! -f \$dst ]; then
install -o 0 -g 0 -m0644 \$src \$dst
case \$dst in
/etc/netstart|/etc/pccard_ether|/etc/rc.suspend|/etc/rc.resume)
chmod 0755 \$dst
;;
/etc/login.conf)
cap_mkdb /etc/login.conf
;;
/etc/master.passwd)
pwd_mkdb -p /etc/master.passwd
;;
esac
fi
done
install -o root -g wheel -m 0644 -b /usr/share/examples/etc/motd /etc/motd && sed -e '5,\$d' -i '' /etc/motd
[ ! -L /etc/aliases ] && ln -sf mail/aliases /etc/aliases || true
[ ! -f /etc/dumpdates ] && install -o root -g operator -m 0664 /dev/null /etc/dumpdates
[ ! -L /etc/namedb ] && ln -sf ../var/named/etc/namedb /etc/namedb || true
[ ! -L /etc/rmt ] && ln -sf /usr/sbin/rmt /etc/rmt || true
[ ! -L /etc/termcap ] && ln -sf /usr/share/misc/termcap /etc/termcap || true
[ ! -f /var/log/sendmail.st ] && install -o root -g wheel -m 0640 /dev/null /var/log/sendmail.st
[ ! -f /var/db/locate.database ] && install -o nobody -g wheel -m 0644 /dev/null /var/db/locate.database
pre-deinstall: |-
chflags noschg /bin/rcp /lib/libc.so.7 /lib/libcrypt.so.5 /lib/libthr.so.3 /libexec/ld-elf.so.1 /sbin/init /usr/bin/chfn /usr/bin/chpass /usr/bin/chsh /usr/bin/crontab /usr/bin/login /usr/bin/opieinfo /usr/bin/opiepasswd /usr/bin/passwd /usr/bin/rlogin /usr/bin/rsh /usr/bin/su /usr/bin/ypchfn /usr/bin/ypchpass /usr/bin/ypchsh /usr/bin/yppasswd /usr/lib/librt.so.1 /var/empty/
for src in /usr/share/examples/etc/*; do
dst=\${src#/usr/share/examples}
case \$dst in
/etc/README.examples|/etc/bsd-style-copyright|/etc/make.conf|/etc/wpa_supplicant.conf)
continue
;;
esac
if [ -f \$src -a -f \$dst ]; then
if cmp -s \$src \$dst; then
rm -f \$dst
case \$dst in
/etc/login.conf)
rm -f /etc/login.conf.db
;;
/etc/master.passwd)
rm -f /etc/passwd /etc/pwd.db /etc/spwd.db
;;
esac
fi
fi
done"