-
Notifications
You must be signed in to change notification settings - Fork 8
/
before.txt
82 lines (72 loc) · 1.89 KB
/
before.txt
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
# ==============================
# Radxa First Boot Configuration
# ==============================
# Allow config to continue even when some commands fail
no_fail
log "Running before.txt as first boot configuration"
# Create default accounts
# Commands:
# add_user <user name> <password>
# user_append_group <user name> <group>
#
add_user radxa radxa
user_append_group radxa sudo
user_append_group radxa audio
user_append_group radxa video
user_append_group radxa plugdev
user_append_group radxa render
user_append_group radxa gpio
user_append_group radxa i2c
user_append_group radxa spidev
user_append_group radxa pwm
add_user rock rock
user_append_group rock sudo
user_append_group rock audio
user_append_group rock video
user_append_group rock plugdev
user_append_group rock render
user_append_group rock gpio
user_append_group rock i2c
user_append_group rock spidev
user_append_group rock pwm
# Resize root partition at the filesystem level
#
resize_root
# Disable services
# Command:
# disable_service <systemd unit name>
#
disable_service ssh
disable_service ssh.socket
disable_service smbd
disable_service nmbd
# Disable systemd-networkd due to systemd-networkd-wait-online blocking network.target
# We use NetworkManger, so systemd-networkd can be safely disabled
disable_service systemd-networkd
# Generate unique hardware fingerprint
#
regenerate_ssh_hostkey
# Configure locale
# Command:
# update_locale <locale>
#
update_locale en_US.UTF-8
# Connect to Wi-Fi
# Command:
# connect_wi-fi <network name> [password]
#
#connect_wi-fi private_network password
# Enable SSH on headless first boot
# Keyword:
# if|if_not <condition> <command>
# Condition:
# headless: When no display connector is connected
# Command:
# enable_service <systemd unit name>
#
if headless enable_service ssh
# Remove first-boot package
# Command:
# remove_packages <package names>
#
remove_packages rsetup-config-first-boot