44{{- $kernelpackage := or .kernelpackage "linux-image-arm64" }}
55{{- $overlays := or .overlays "qsc-deb-releases" }}
66{{- $buildid := or .buildid "" }}
7+ {{- $username := or .username "qcom" }}
8+ {{- $hostname := or .hostname "qcom" }}
79
810{{- $variantid := "console" }}
911{{- if eq $xfcedesktop "true" }}
@@ -121,16 +123,16 @@ actions:
121123 - wpasupplicant
122124
123125 - action : run
124- description : Set hostname to "debian "
126+ description : Set hostname to "{{ $hostname }} "
125127 chroot : true
126128 command : |
127129 set -eux
128- echo debian >/etc/hostname
130+ echo {{ $hostname }} >/etc/hostname
129131 # /etc/hosts is created by netbase
130- sed -i "1s/^/127.0.1.1 debian \n/" /etc/hosts
132+ sed -i "1s/^/127.0.1.1\t{{ $hostname }} \n/" /etc/hosts
131133
132134 - action : run
133- description : Add a "debian " user, add it to sudoers and various groups
135+ description : Add a "{{ $username }} " user, add it to sudoers and various groups
134136 chroot : true
135137 command : |
136138 set -eux
@@ -140,17 +142,17 @@ actions:
140142 # from the serial console, over SSH, or in containers - where the desktop
141143 # session has not updated ACLs to the device nodes
142144 useradd --create-home --shell /bin/bash --user-group \
143- --groups adm,audio,fastrpc,render,sudo,users,video debian
144- # set password to "debian "
145- echo debian:debian | chpasswd
145+ --groups adm,audio,fastrpc,render,sudo,users,video {{ $username }}
146+ # set password to "{{ $username }} "
147+ echo {{ $username }}:{{ $username }} | chpasswd
146148 # password must be changed on first login
147- chage --lastday 0 debian
149+ chage --lastday 0 {{ $username }}
148150 # add to sudoers
149151 mkdir -v --mode 755 --parents /etc/sudoers.d
150152 # subshell to override umask
151153 (
152154 umask 226
153- echo "debian ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/90-debos
155+ echo "{{ $username }} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/90-debos
154156 )
155157
156158 # NB: Recommends pull in way too many packages, and we don't need to follow
@@ -206,7 +208,7 @@ actions:
206208 chroot : true
207209 command : |
208210 set -eux
209- usermod -a -G docker debian
211+ usermod -a -G docker {{ $username }}
210212
211213{{- if eq $xfcedesktop "true" }}
212214 # this should ideally be task-xfce-desktop, but this pulls too many apps;
0 commit comments