summaryrefslogtreecommitdiffstats
path: root/source/n/ppp
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/ppp')
-rw-r--r--source/n/ppp/doinst.sh5
-rwxr-xr-xsource/n/ppp/ppp.SlackBuild14
2 files changed, 18 insertions, 1 deletions
diff --git a/source/n/ppp/doinst.sh b/source/n/ppp/doinst.sh
index 54facc41c..3a74db67c 100644
--- a/source/n/ppp/doinst.sh
+++ b/source/n/ppp/doinst.sh
@@ -10,6 +10,11 @@ config() {
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
+
+if [ -r etc/pam.d/ppp.new ]; then
+ config etc/pam.d/ppp.new
+fi
+
config etc/ppp/chap-secrets.new
config etc/ppp/options.new
config etc/ppp/pap-secrets.new
diff --git a/source/n/ppp/ppp.SlackBuild b/source/n/ppp/ppp.SlackBuild
index 8c1a9dd95..13b21fb36 100755
--- a/source/n/ppp/ppp.SlackBuild
+++ b/source/n/ppp/ppp.SlackBuild
@@ -86,13 +86,25 @@ zcat $CWD/0028-pppoe-include-netinet-in.h-before-linux-in.h.patch.gz | patch -p1
zcat $CWD/ppp.glibc228.diff.gz | patch -p1 --verbose || exit 1
+# Choose correct options depending on whether PAM is installed:
+if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
+ PAM_OPTIONS="USE_PAM=y"
+else
+ unset PAM_OPTIONS
+fi
+
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} || exit 1
-make $NUMJOBS || make || exit 1
+make $PAM_OPTIONS $NUMJOBS || make || exit 1
make install DESTDIR=$PKG/usr || exit 1
+if [ ! -z "$PAM_OPTIONS" ]; then
+ mkdir -p $PKG/etc/pam.d
+ cat pppd/ppp.pam > $PKG/etc/pam.d/ppp.new
+fi
+
# Install PPP config files:
mkdir -p $PKG/etc/ppp
cp -a etc.ppp/* $PKG/etc/ppp