File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ allow_suser \
92
92
allow_extattr \
93
93
allow_adjtime \
94
94
allow_settime \
95
+ environment \
96
+ environment_global \
95
97
"
96
98
97
99
###
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ exec_master_prestop status exec_timeout exec_fib stop_timeout mount_fdescfs allo
7
7
emulator_flags allow_kmem exec_consolelog jdomain b_order allow_fdescfs allow_sysvipc protected hidden maintenance name allow_reserved_ports \
8
8
childrenmax persist enforce_statfs state_time allow_raw_sockets allow_fusefs allow_linprocfs allow_linsysfs allow_read_msgbuf allow_vmm \
9
9
allow_unprivileged_proc_debug sysvsem sysvshm sysvmsg mnt_start mnt_stop allow_mlock mount_procfs mount_linprocfs mount_linsysfs gid tags \
10
- ci_gw4 zfs_encryption boot_delay allow_nfsd jnameserver allow_suser allow_extattr allow_adjtime allow_settime"
10
+ ci_gw4 zfs_encryption boot_delay allow_nfsd jnameserver allow_suser allow_extattr allow_adjtime allow_settime environment_global environment "
11
11
12
12
jname="text default 0 unique PRIMARY KEY"
13
13
jid="integer default 0"
@@ -123,5 +123,8 @@ boot_delay="integer default 0"
123
123
124
124
jnameserver="text default \"0\""
125
125
126
+ environment_global="TEXT default \"environment\""
127
+ environment="TEXT default \"environment.local\""
128
+
126
129
INITDB=""
127
130
CONSTRAINT=""
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # v12.1.3
3
+ # Update jails for environment / environment_global
4
+ : ${distdir=" /usr/local/cbsd" }
5
+ [ ! -r " ${distdir} /subr/cbsdbootstrap.subr" ] && exit 1
6
+ . ${distdir} /subr/cbsdbootstrap.subr || exit 1
7
+ test_sql_stuff
8
+
9
+ [ ! -h " ${dbdir} /local.sqlite" ] && exit 0
10
+
11
+ mydb=" ${dbdir} /local.sqlite"
12
+
13
+ unset _test _count
14
+ _count=$( ${miscdir} /sqlcli ${mydb} ' SELECT COUNT(jname) FROM jails WHERE emulator="jail"' )
15
+ [ " ${_count} " = " 0" ] && exit 0 # no jails here
16
+
17
+ _test=$( ${miscdir} /sqlcli ${mydb} " SELECT environment FROM jails LIMIT 1" )
18
+ if [ -z " ${_test} " ]; then
19
+ ${ECHO} " * ${N1_COLOR} Update jails tables: add environment${N0_COLOR} "
20
+ ${miscdir} /sqlcli ${mydb} " ALTER TABLE jails ADD COLUMN environment TEXT default \" environment.local\" "
21
+ fi
22
+
23
+ _test=$( ${miscdir} /sqlcli ${mydb} " SELECT environment_global FROM jails LIMIT 1" )
24
+ if [ -z " ${_test} " ]; then
25
+ ${ECHO} " * ${N1_COLOR} Update jails tables: add environment_global${N0_COLOR} "
26
+ ${miscdir} /sqlcli ${mydb} " ALTER TABLE jails ADD COLUMN environment_global TEXT default \" environment\" "
27
+ fi
28
+
29
+ exit 0
You can’t perform that action at this time.
0 commit comments