-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcbsd.conf
152 lines (137 loc) · 3.99 KB
/
cbsd.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
148
149
150
151
152
# Main CBSD config file
# clean general global variables
unset oarch over ostable arch target_arch ver stable
# defines
product="CBSD"
myversion="13.0.9"
if [ -z "${workdir}" ]; then
if [ -z "${cbsd_workdir}" ]; then
echo "no workdir"
else
export workdir="${cbsd_workdir}"
fi
exit 1
fi
distdir="/usr/local/cbsd"
# Subroutine file paths
subrdir="${distdir}/subr"
cbsdinit="${subrdir}/cbsdinit.subr"
subr="${subrdir}/nc.subr"
settingstui="${subrdir}/settings-tui.subr"
dialog="${subrdir}/dialog.subr"
tools="${subrdir}/tools.subr"
mdtools="${subrdir}/mdtools.subr"
zfstool="${subrdir}/zfs.subr"
jfs="${subrdir}/jfs.subr"
color="${subrdir}/ansiicolor.subr"
nodes="${subrdir}/nodes.subr"
jrcconf="${subrdir}/rcconf.subr"
rjrcconf="${subrdir}/rrcconf.subr"
vimageconf="${subrdir}/vnet.subr"
initenv="${subrdir}/initenv.subr"
system="${subrdir}/system.subr"
buildconf="${subrdir}/build.subr"
distccacheconf="${subrdir}/distccache.subr"
base2pkgconf="${subrdir}/base2pkg.subr"
mailconf="${subrdir}/mailtools.subr"
strings="${subrdir}/strings.subr"
nodenamefile="${workdir}/nodename"
inventory="${workdir}/nc.inventory"
nodedescr="${workdir}/node.desc"
libdir="${distdir}/lib"
miscdir="${distdir}/misc"
jobdir="${distdir}/job"
srcdir="${workdir}/src"
tmpdir="${workdir}/tmp"
ftmpdir="${workdir}/ftmp"
importdir="${workdir}/import"
exportdir="${workdir}/export"
basejaildir="${workdir}/basejail"
basejailpref="base"
jaildatadir="${workdir}/jails-data"
jailfstabdir="${workdir}/jails-fstab"
jailrcconfdir="${workdir}/jails-rcconf"
jailfstabpref="fstab."
jaildir="${workdir}/jails"
jaildatapref="data"
jailsysdir="${workdir}/jails-system"
bindir="${distdir}/bin"
etcdir="${workdir}/etc"
jailctldir="${distdir}/jailctl"
nodectl="${distdir}/nodectl"
rcddir="${distdir}/rc.d"
sbindir="${distdir}/sbin"
systemdir="${distdir}/system"
moduledir="${workdir}/modules"
nodedir="${workdir}/nodes"
distmoduledir="${distdir}/modules"
toolsdir="${distdir}/tools"
upgradedir="${distdir}/upgrade"
vardir="${workdir}/var"
spooldir="${vardir}/spool"
taskdir="${spooldir}/task"
rundir="${vardir}/run"
maildir="${vardir}/mail"
logdir="${vardir}/log"
sharedir="${workdir}/share"
distsharedir="${distdir}/share"
dbdir="${vardir}/db"
gelidir="${dbdir}/geli"
localcbsdconffile="cbsd.conf"
localcbsdconf="${distdir}/${localcbsdconffile}"
sudoexecdir="${distdir}/sudoexec"
systemsudoexecdir="${distdir}/sudoexec"
cbsduser="cbsd"
production="0"
rsshdir="${workdir}/.rssh"
sshdir="${workdir}/.ssh"
templateldir="${workdir}/template"
fwcount_st="99"
fwcount_end="2000"
fwexpose_st="2001"
fwexpose_end="2999"
greeting="node"
TMPDIR="${tmpdir}" # used by mktemp
# external source for online doc
docversion="13.x"
cbsddocsrc="https://www.bsdstore.ru/en/${docversion}"
[ -r "${nodenamefile}" ] && nodename=$( cat ${nodenamefile} | awk '{printf $1}' )
if [ -n "${CBSD_DEBUG}" ]; then
export NOCOLOR=1
NOCOLOR=1
export debug=1
set -o xtrace
fi
if [ -n "${NOINTER}" ]; then
export NOINTER=1
export inter=0
fi
if [ "$1" = "--pause_after_err" ]; then
export pause_after_err=1
fi
if [ -z "${ECHO}" ]; then
if [ -n "${NOCOLOR}" ]; then
ECHO="echo"
else
ECHO="echo -e"
if [ -r "${color}" ]; then
. ${color}
[ -r "${workdir}/etc/color.conf" ] && . "${workdir}/etc/color.conf"
fi
fi
fi
[ -f "${inventory}" ] && . ${inventory}
# Load _CMD variable: Default and custom by platform name
[ -z "${platform}" ] && platform=$( uname -s )
# Overwrite $platform to HardenedBSD if we have /usr/sbin/hbsd-update:
[ -e "/usr/sbin/hbsd-update" ] && platform="HardenedBSD"
# Overwrite $platform to TrueOS if we have TrueOS-specific dirs
[ -d "/usr/local/etc/trueos" -a -d "/usr/local/share/trueos" ] && platform="TrueOS"
[ -f ${workdir}/cmd.subr ] && . ${workdir}/cmd.subr
[ -f "${subrdir}/${platform}.subr" ] && . ${subrdir}/${platform}.subr
if [ -z "${freebsdhostversion}" ]; then
export freebsdhostversion=$( ${miscdir}/elf_tables --ver /bin/sh 2>/dev/null )
[ -z "${freebsdhostversion}" ] && export freebsdhostversion="0"
fi
[ -f "${workdir}/etc/cbsd.conf" ] && . ${workdir}/etc/cbsd.conf
umask 002