define DEBCONF :=
keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC
keyboard-configuration keyboard-configuration/variant select English (US) - English (Macintosh)
+
endef
.PHONY: _debconf_selections
_config: _rootpass
endif
+ifdef rootkey
+ export rootkey
+ _config: _rootkey
+endif
+
ifdef users
_config: _users
endif
_rootpass: ${CFGROOT}
chroot "$${CFGROOT}" usermod -p "$$(openssl passwd "$${rootpass}")" root
+${rootkey}.pub:
+ ssh-keygen -N '' -f "$${rootkey}"
+
+_rootkey: ${CFGROOT} ${rootkey}.pub
+ mkdir -m 700 "$${CFGROOT}/root/.ssh/"
+ cp "$${rootkey}.pub" "$${CFGROOT}/root/.ssh/authorized_keys"
+
_users: ${CFGROOT}
for u in $(subst ${comma_},${space_},${users}); do \
chroot "$${CFGROOT}" useradd -m -s /bin/bash -p "$$(openssl passwd "")" "$$u"; \