From 7328ec14b56f8ef6206c8f070b21a4185250b73a Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 18 Jan 2022 18:33:34 +0000 Subject: removed postinstall scripts form pam and shadow --- repo/system/pam.xibuild | 13 +++++-------- repo/system/shadow.xibuild | 18 ++++++++---------- 2 files changed, 13 insertions(+), 18 deletions(-) (limited to 'repo/system') diff --git a/repo/system/pam.xibuild b/repo/system/pam.xibuild index 2fccf4e..b9149b1 100644 --- a/repo/system/pam.xibuild +++ b/repo/system/pam.xibuild @@ -27,12 +27,9 @@ build () { package () { make DESTDIR=$PKG_DEST install install -v -m755 -d $PKG_DEST/etc/pam.d -} - -postinstall () { - install -vdm755 /etc/pam.d - cat > /etc/pam.d/system-account << "EOF" + install -vdm755 $PKG_DEST/etc/pam.d + cat > $PKG_DEST/etc/pam.d/system-account << "EOF" # Begin /etc/pam.d/system-account account required pam_unix.so @@ -40,7 +37,7 @@ account required pam_unix.so # End /etc/pam.d/system-account EOF - cat > /etc/pam.d/system-auth << "EOF" + cat > $PKG_DEST/etc/pam.d/system-auth << "EOF" # Begin /etc/pam.d/system-auth auth required pam_unix.so @@ -48,7 +45,7 @@ auth required pam_unix.so # End /etc/pam.d/system-auth EOF - cat > /etc/pam.d/system-session << "EOF" + cat > $PKG_DEST/etc/pam.d/system-session << "EOF" # Begin /etc/pam.d/system-session session required pam_unix.so @@ -56,7 +53,7 @@ session required pam_unix.so # End /etc/pam.d/system-session EOF - cat > /etc/pam.d/system-password << "EOF" + cat > $PKG_DEST/etc/pam.d/system-password << "EOF" # Begin /etc/pam.d/system-password # use sha512 hash for encryption, use shadow, and try to use any previously diff --git a/repo/system/shadow.xibuild b/repo/system/shadow.xibuild index eabbd3f..d26c6ee 100644 --- a/repo/system/shadow.xibuild +++ b/repo/system/shadow.xibuild @@ -35,10 +35,8 @@ package () { make exec_prefix=/usr DESTDIR=$PKG_DEST install make DESTDIR=$PKG_DEST -C man install-man mkdir -p $PKG_DEST/etc/default -} -postinstall () { - install -v -m644 /etc/login.defs /etc/login.defs.orig && + install -v -m644 $PKG_DEST/etc/login.defs $PKG_DEST/etc/login.defs.orig && for FUNCTION in FAIL_DELAY \ FAILLOG_ENAB \ LASTLOG_ENAB \ @@ -56,10 +54,10 @@ postinstall () { CHFN_AUTH ENCRYPT_METHOD \ ENVIRON_FILE do - sed -i "s/^${FUNCTION}/# &/" /etc/login.defs + sed -i "s/^${FUNCTION}/# &/" $PKG_DEST/etc/login.defs done - cat > /etc/pam.d/login << "EOF" + cat > $PKG_DEST/etc/pam.d/login << "EOF" # Begin /etc/pam.d/login # Set failure delay before next prompt to 3 seconds @@ -107,7 +105,7 @@ password include system-password # End /etc/pam.d/login EOF - cat > /etc/pam.d/passwd << "EOF" + cat > $PKG_DEST/etc/pam.d/passwd << "EOF" # Begin /etc/pam.d/passwd password include system-password @@ -115,7 +113,7 @@ password include system-password # End /etc/pam.d/passwd EOF - cat > /etc/pam.d/su << "EOF" + cat > $PKG_DEST/etc/pam.d/su << "EOF" # Begin /etc/pam.d/su # always allow root @@ -143,7 +141,7 @@ session include system-session # End /etc/pam.d/su EOF - cat > /etc/pam.d/chpasswd << "EOF" + cat > $PKG_DEST/etc/pam.d/chpasswd << "EOF" # Begin /etc/pam.d/chpasswd # always allow root @@ -157,9 +155,9 @@ password include system-password # End /etc/pam.d/chpasswd EOF -sed -e s/chpasswd/newusers/ /etc/pam.d/chpasswd >/etc/pam.d/newusers +sed -e s/chpasswd/newusers/ $PKG_DEST/etc/pam.d/chpasswd >$PKG_DEST/etc/pam.d/newusers - cat > /etc/pam.d/chage << "EOF" + cat > $PKG_DEST/etc/pam.d/chage << "EOF" # Begin /etc/pam.d/chage # always allow root -- cgit v1.2.1