This file is indexed.

config is in slapos-node-unofficial 1.3.18-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
#!/bin/sh
set -e



. /usr/share/debconf/confmodule

CONFIG_FILE=/etc/slapos/slapos-node-unofficial.cfg

MASTER_URL=
COMPUTER_ID=
SOFTWARE_ROOT=
PARTITION_AMOUNT=
IPV4_LOCAL_NETWORK=

if [ -f "$CONFIG_FILE" ]; then
    MASTER_URL="`sed -ne 's#^\s*master_url[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
    COMPUTER_ID="`sed -ne 's#^\s*computer_id[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
    SOFTWARE_ROOT="`sed -ne 's#^\s*software_root[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
    PARTITION_AMOUNT="`sed -ne 's#^\s*partition_amount[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
    IPV4_LOCAL_NETWORK="`sed -ne 's#^\s*ipv4_local_network[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
fi

if [ -n "$MASTER_URL" ]; then
    db_set shared/slapos/master_url "$MASTER_URL"
    db_input medium shared/slapos/master_url || true
else
    db_input high shared/slapos/master_url || true
fi

db_go || true
db_get shared/slapos/master_url
( echo "$RET" | grep -q "^https://" ) && \
    db_input high shared/slapos/master_url_with_ssl_note || true

if [ -n "$COMPUTER_ID" ]; then
    db_set slapos-node-unofficial/computer_id "$COMPUTER_ID"
    db_input medium slapos-node-unofficial/computer_id || true
else
    db_input high slapos-node-unofficial/computer_id || true
fi

if [ -n "$SOFTWARE_ROOT" ]; then
    db_set slapos-node-unofficial/software_root "$SOFTWARE_ROOT"
    db_input medium slapos-node-unofficial/software_root || true
else
    db_input high slapos-node-unofficial/software_root || true
fi

if [ -n "$PARTITION_AMOUNT" ]; then
    db_set slapos-node-unofficial/partition_amount "$PARTITION_AMOUNT"
    db_input medium slapos-node-unofficial/partition_amount || true
else
    db_input high slapos-node-unofficial/partition_amount || true
fi

if [ -n "$IPV4_LOCAL_NETWORK" ]; then
    db_set slapos-node-unofficial/ipv4_local_network "$IPV4_LOCAL_NETWORK"
    db_input medium slapos-node-unofficial/ipv4_local_network || true
else
    db_input high slapos-node-unofficial/ipv4_local_network || true
fi

db_go || true

exit 0