Subject: [alpine-aports] [PATCH] community/shadow: add useradd defaults file

From: Drew DeVault <[email-masked]>
Date: Sat, 20 Jan 2018 11:23:15 -0500

---
 community/shadow/APKBUILD | 9 +++++++--
 community/shadow/useradd  | 8 ++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 community/shadow/useradd

diff --git a/community/shadow/APKBUILD b/community/shadow/APKBUILD
index 13dc98d7ae..f560916f5a 100644
--- a/community/shadow/APKBUILD
+++ b/community/shadow/APKBUILD
@@ -8,7 +8,6 @@ pkgdesc="PAM-using login and passwd utilities (usermod, useradd, ...)"
 url="http://pkg-shadow.alioth.debian.org/"
 arch="all"
 license="GPL"
-depends=""
 makedepends="linux-pam-dev"
 subpackages="$pkgname-doc $pkgname-dbg $pkgname-uidmap"
 source="https://github.com/shadow-maint/shadow/releases/download/$pkgver/shadow-$pkgver.tar.xz
@@ -16,6 +15,7 @@ source="https://github.com/shadow-maint/shadow/releases/download/$pkgver/shadow-
 	dots-in-usernames.patch
 	useradd-usergroups.patch
 	pam-useradd.patch
+	useradd
 	"
 # secfixes:
 #   4.5-r0:
@@ -83,6 +83,10 @@ package() {
 	rm "$pkgdir"/etc/login.defs
 	echo "USERGROUPS_ENAB yes" > "$pkgdir"/etc/login.defs
 
+	# install our useradd defaults
+	mkdir -p "$pkgdir"/etc/default
+	install -Dm644 "$srcdir"/useradd "$pkgdir"/etc/default/useradd
+
 	# Avoid conflict with man-pages.
 	rm "$pkgdir"/usr/share/man/man3/getspnam.3* \
 		"$pkgdir"/usr/share/man/man5/passwd.5* || return 1
@@ -107,4 +111,5 @@ sha512sums="e57f8db54df23301c229d4be30d4cbb67efa1d1809cffcff79adc480b6019fb2b5fd
 46a6f83f3698e101b58b8682852da749619412f75dfa85cecad03d0847f6c3dc452d984510db7094220e4570a0565b83b0556e16198ad894a3ec84b3e513d58d  login.pamd
 745eea04c054226feba165b635dbb8570b8a04537d41e914400a4c54633c3a9cf350da0aabfec754fb8cf3e58fc1c8cf597b895506312f19469071760c11f31d  dots-in-usernames.patch
 49f1d5ded82d2d479805c77d7cc6274c30233596e375b28306b31a33f8fbfc3611dbc77d606081b8300247908c267297dbb6c5d1a30d56095dda53c6a636fb56  useradd-usergroups.patch
-0b4587e263cb6be12fa5ae6bc3b3fc4d3696dae355bc67d085dc58c52ff96edb4d163b95db2092b8c2f3310839430cac03c7af356641b42e24ee4aa6410f5cf1  pam-useradd.patch"
+0b4587e263cb6be12fa5ae6bc3b3fc4d3696dae355bc67d085dc58c52ff96edb4d163b95db2092b8c2f3310839430cac03c7af356641b42e24ee4aa6410f5cf1  pam-useradd.patch
+5ee695edf92187510ff007c85fb1cfff0ee19afaf2e77005403b9863e43320df5b1ac8ab4f860887da228be472ac8a51e34403385948e41ec576fbc4b2e4e59c  useradd"
diff --git a/community/shadow/useradd b/community/shadow/useradd
new file mode 100644
index 0000000000..6644303af0
--- /dev/null
+++ b/community/shadow/useradd
@@ -0,0 +1,8 @@
+# useradd defaults file
+GROUP=1000
+HOME=/home
+INACTIVE=-1
+EXPIRE=
+SHELL=/bin/sh
+SKEL=/etc/skel
+CREATE_MAIL_SPOOL=no
-- 
2.15.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---