mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 09:42:15 +03:00
bug fix for pam configuration during ahenk installation
This commit is contained in:
parent
38a09d5856
commit
c5110f5488
2 changed files with 4 additions and 24 deletions
21
debian/postinst
vendored
21
debian/postinst
vendored
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# postinst script for ahenk
|
# postinst script for ahenk
|
||||||
#
|
#
|
||||||
# see: dh_installdeb(1)
|
# see: dh_installdeb(1)
|
||||||
|
@ -13,22 +13,10 @@ while true; do
|
||||||
read -p "Eğer makinada var olan bir pam konfigurasyonu varsa geçersiz hale gelecektir.Devam etmek istiyor musunuz? [e/H]" eH
|
read -p "Eğer makinada var olan bir pam konfigurasyonu varsa geçersiz hale gelecektir.Devam etmek istiyor musunuz? [e/H]" eH
|
||||||
case $eH in
|
case $eH in
|
||||||
[e] )
|
[e] )
|
||||||
if [ -d /etc/pam.d ]
|
if [ -d /usr/share/pam-configs ]
|
||||||
then
|
then
|
||||||
if [ -f /etc/pam.d/common-session ]
|
echo -e "Name: Support for authentication by external scripts\nDefault: yes\nPriority: 257\nSession-Type: Additional\nSession:\n\toptional\tpam_script.so" > /usr/share/pam-configs/pam_script
|
||||||
then
|
DEBIAN_FRONTEND=noninteractive pam-auth-update
|
||||||
cp -f /etc/pam.d/common-session /etc/pam.d/common-session.orig
|
|
||||||
grep -q 'pam_script.so' /etc/pam.d/common-session
|
|
||||||
if [ $? -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "pam_scripst.so zaten mevcut."
|
|
||||||
else
|
|
||||||
echo "pam_script.so bulunamadı! /etc/pam.d/common-session dosyasına ekleniyor..."
|
|
||||||
# Use optional, we don't want access denied if there is a problem:
|
|
||||||
echo "session optional pam_script.so" >> /etc/pam.d/common-session
|
|
||||||
echo "pam_script.so eklendi."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
break;;
|
break;;
|
||||||
[H] ) exit;;
|
[H] ) exit;;
|
||||||
|
@ -36,7 +24,6 @@ while true; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
systemctl --system daemon-reload
|
systemctl --system daemon-reload
|
||||||
systemctl enable ahenk.service
|
systemctl enable ahenk.service
|
||||||
|
|
||||||
|
|
7
debian/postrm
vendored
7
debian/postrm
vendored
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# postrm script for ahenk
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ -f /etc/pam.d/common-session.orig ]; then
|
|
||||||
mv -f /etc/pam.d/common-session.orig /etc/pam.d/common-session
|
|
||||||
fi
|
|
Loading…
Reference in a new issue