]> git.plutz.net Git - blast/commitdiff
patches from zack branch
authorPaul Hänsch <paul@plutz.net>
Thu, 2 Feb 2023 01:25:36 +0000 (01:25 +0000)
committerPaul Hänsch <paul@plutz.net>
Thu, 2 Feb 2023 01:25:36 +0000 (01:25 +0000)
modules/default.mk
modules/smb_nis.mk

index 2bc1a8dc8f43a8aacf15425476508cda41df99ad..cf29d461a815d5e822ed102c09ff1f5d579a88ad 100644 (file)
@@ -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}
index a596fb36d8197da4be611fad0617f95f55712af0..48514cf03dccb5e25d31cdaf55bd20470fbe2a6d 100644 (file)
@@ -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}" >"$@"