From: Paul Hänsch Date: Thu, 2 Feb 2023 01:25:36 +0000 (+0000) Subject: patches from zack branch X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=5b40b48b1ce9280e3df230a186fb050784506c73;p=blast patches from zack branch --- diff --git a/modules/default.mk b/modules/default.mk index 2bc1a8d..cf29d46 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -119,6 +119,10 @@ _hostname: ${CFGROOT} printf '%s\n' "$${hostname}" >"$${CFGROOT}/etc/hostname" sed -Ei "s;^127\.0\.0\.1.*$$;& $${hostname};" "$${CFGROOT}/etc/hosts" +_timeouts: ${CFGROOT} + printf '%s\n' DefaultTimeoutStartSec=10s DefaultTimeoutStopSec=10s >>"${CFGROOT}/etc/systemd/system.conf" + + .PHONY: _systemd_timeout _config: _systemd_timeout _systemd_timeout: ${CFGROOT} diff --git a/modules/smb_nis.mk b/modules/smb_nis.mk index a596fb3..48514cf 100644 --- a/modules/smb_nis.mk +++ b/modules/smb_nis.mk @@ -1,4 +1,4 @@ -PACKAGES += cifs-utils libpam-mount libpam-script lightdm nis nscd samba-common-bin usermode +PACKAGES += cifs-utils libpam-mount libpam-script lightdm nis nscd samba-common-bin usermode libnss-nis ifndef nis_server nis_server := nismaster @@ -41,19 +41,22 @@ define smb_nis_pammount := endef -.PHONY: _smb_nis -_config: _smb_nis +.PHONY: _smb_nis _ypbind +_config: _smb_nis _ypbind _smb_nis: ${CFGROOT}/opt/pam_script/pam_script_passwd ${CFGROOT}/etc/security/pam_mount.conf.xml -_smb_nis: ${CFGROOT}/etc/yp.conf ${CFGROOT}/etc/defaultdomain +_smb_nis: ${CFGROOT}/etc/yp.conf ${CFGROOT}/etc/defaultdomain ${CFGROOT}/etc/default/nis _smb_nis: ${CFGROOT} sed -Ei 's;^(passwd:|group:|shadow:|gshadow:).*$$;\1 files nis;' $${CFGROOT}/etc/nsswitch.conf sed -Ei '/pam_(script|mount).so/d' $${CFGROOT}/etc/pam.d/common-* - printf '\nauth optional pam_mount.so\n' >>$${CFGROOT}/etc/pam.d/common-auth + printf '\nauth required pam_mount.so\n' >>$${CFGROOT}/etc/pam.d/common-auth printf '\nsession optional pam_mount.so\n' >>$${CFGROOT}/etc/pam.d/common-session printf '\npassword required pam_script.so dir=/opt/pam_script\n' >$${CFGROOT}/etc/pam.d/common-password +_ypbind: ${CFGROOT} + chroot "$<" systemctl enable ypbind + ${CFGROOT}/opt/pam_script/pam_script_passwd: ${CFGROOT} .FORCE mkdir -p "$(dir $@)" printf '%s' "$${smb_nis_pamscript}" >"$@" @@ -68,3 +71,7 @@ ${CFGROOT}/etc/yp.conf: ${CFGROOT} .FORCE ${CFGROOT}/etc/defaultdomain: ${CFGROOT} .FORCE printf '%s\n' "${nis_domain}" >"$@" + printf 'kernel.domainname = %s\n' "${nis_domain}" >"${CFGROOT}/etc/sysctl.d/10-domainname.conf" + +${CFGROOT}/etc/default/nis: ${CFGROOT} .FORCE + printf '%s\n' "NISSERVER=false" "NISCLIENT=true" "YPPWDDIR=/etc" "NISMASTER=${nis_server}" >"$@"