1 PACKAGES += bilibop-lockfs
3 .PHONY: _live _live_sudo _live_sudo_users
6 _config: _live_sudo_users
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"
15 _live_sudo: ${CFGROOT}/etc/sudoers.d/nopassword
16 _live_sudo: ${CFGROOT}/var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla
18 ${CFGROOT}/etc/sudoers.d/nopassword: ${CFGROOT}
19 printf '%%sudo ALL=NOPASSWD: ALL\n' >"$@"
22 ${CFGROOT}/var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla: ${CFGROOT}
23 mkdir -p -m 700 "$${CFGROOT}/var/lib/polkit-1/"
25 printf '[Nopassword]\nIdentity=unix-group:sudo\nAction=*\nResultActive=yes\n' >"$@"
27 _live_sudo_users: _users
28 for u in $(subst ${comma_},${space_},${users}); do \
29 chroot "$${CFGROOT}" adduser "$$u" sudo; \