-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcbsd.conf
126 lines (116 loc) · 3.33 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
# clean general global variables
unset oarch over ostable arch target_arch ver stable
# defines
product="CBSD"
myversion="11.1.17"
if [ -z "${workdir}" ]; then
echo "no workdir"
exit 1
fi
distdir="/usr/local/cbsd"
subr="${workdir}/nc.subr"
nodenamefile="${workdir}/nodename"
settingstui="${workdir}/settings-tui.subr"
dialog="${workdir}/dialog.subr"
tools="${workdir}/tools.subr"
mdtools="${workdir}/mdtools.subr"
zfstool="${workdir}/zfs.subr"
jfs="${workdir}/jfs.subr"
color="${distdir}/ansiicolor.subr"
nodes="${workdir}/nodes.subr"
jrcconf="${workdir}/rcconf.subr"
vimageconf="${workdir}/vnet.subr"
vimagetui="${workdir}/vnet-tui.subr"
inventory="${workdir}/nc.inventory"
nodedescr="${workdir}/node.desc"
initenv="${workdir}/initenv.subr"
system="${workdir}/system.subr"
buildconf="${workdir}/build.subr"
distccacheconf="${workdir}/distccache.subr"
base2pkgconf="${workdir}/base2pkg.subr"
mailconf="${workdir}/mailtools.subr"
strings="${workdir}/strings.subr"
libdir="${workdir}/lib"
miscdir="${workdir}/misc"
jobdir="${workdir}/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="${workdir}/bin"
etcdir="${workdir}/etc"
jailctldir="${workdir}/jailctl"
nodectl="${workdir}/nodectl"
rcddir="${workdir}/rc.d"
sbindir="${workdir}/sbin"
systemdir="${workdir}/system"
moduledir="${workdir}/modules"
toolsdir="${workdir}/tools"
upgradedir="${workdir}/upgrade"
vardir="${workdir}/var"
spooldir="${vardir}/spool"
taskdir="${spooldir}/task"
rundir="${vardir}/run"
maildir="${vardir}/mail"
logdir="${vardir}/log"
sharedir="${workdir}/share"
dbdir="${vardir}/db"
gelidir="${dbdir}/geli"
localcbsdconffile="cbsd.conf"
localcbsdconf="${workdir}/${localcbsdconffile}"
sudoexecdir="${workdir}/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"
jailmapdb="${dbdir}/jmap.txt"
# external source for online doc
docversion="10.3"
cbsddocsrc="https://www.bsdstore.ru/en/${docversion}"
[ -f "${nodenamefile}" ] && nodename=$( /bin/cat ${nodenamefile} )
if [ "$1" = "--debug" ]; then
export NOCOLOR=1
NOCOLOR=1
export debug=1
set -o xtrace
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"
[ -f "${color}" ] && . $color
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"
[ -f "${workdir}/cmd.subr" ] && . ${workdir}/cmd.subr
[ -f "${workdir}/${platform}.subr" ] && . ${workdir}/${platform}.subr
if [ -z "${freebsdhostversion}" ]; then
export freebsdhostversion=$( ${miscdir}/elf_tables --ver /bin/sh 2>/dev/null )
[ -z "${freebsdhostversion}" ] && export freebsdhostversion="0"
fi
umask 002