X-Git-Url: http://git.plutz.net/?p=blast;a=blobdiff_plain;f=modules%2Fdefault.mk;h=326344006abffc2bdd6497bdd9b3ed7f5cef2c42;hp=47f958b8b69f72883d79389bae391b8d78bc4e9c;hb=34a051307470e9b8efe29525e95832b52891ad4c;hpb=35a1269915906c26c6eb81f77db2ddc7b89f17c0 diff --git a/modules/default.mk b/modules/default.mk index 47f958b..3263440 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -11,6 +11,7 @@ endif export DEBCONF define DEBCONF := + keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC keyboard-configuration keyboard-configuration/variant select English (US) - English (Macintosh) endef @@ -51,6 +52,11 @@ ifdef rootpass _config: _rootpass endif +ifdef rootkey + export rootkey + _config: _rootkey +endif + ifdef users _config: _users endif @@ -63,6 +69,13 @@ 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"; \