]> git.plutz.net Git - blast/blob - modules/live.mk
avoid loading videocore overlay twice, install dri driver
[blast] / modules / live.mk
1 PACKAGES += bilibop-lockfs
2
3 .PHONY: _live _live_sudo _live_sudo_users
4
5 ifdef users
6   _config: _live_sudo_users
7 endif
8
9 _umount: _live
10 _live: ${CFGROOT} _bootloader
11         grep -x aufs "$${CFGROOT}/etc/initramfs-tools" || printf 'aufs\n' >>"$${CFGROOT}/etc/initramfs-tools/modules"
12         sed -i 's; root=; lockfs=1G root=;' "$${CFGROOT}/boot/bootmenu.cfg" "$${CFGROOT}/boot/grub.cfg"
13
14 _config: _live_sudo
15 _live_sudo: ${CFGROOT}/etc/sudoers.d/nopassword
16 _live_sudo: ${CFGROOT}/var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla
17
18 ${CFGROOT}/etc/sudoers.d/nopassword: ${CFGROOT}
19         printf '%%sudo ALL=NOPASSWD: ALL\n' >"$@"
20         chmod 440 "$@"
21
22 ${CFGROOT}/var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla: ${CFGROOT}
23         mkdir -p -m 700 "$${CFGROOT}/var/lib/polkit-1/"
24         mkdir -p "$(dir $@)"
25         printf '[Nopassword]\nIdentity=unix-group:sudo\nAction=*\nResultActive=yes\n' >"$@"
26
27 _live_sudo_users: _users
28         for u in $(subst ${comma_},${space_},${users}); do \
29           chroot "$${CFGROOT}" adduser "$$u" sudo; \
30         done