mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-23 18:14:54 +08:00
rp-pppoe: new version, added systemd service file
This commit is contained in:
parent
3cd2ab8e2c
commit
1bb4ebb873
@ -3,8 +3,8 @@
|
|||||||
# Maintainer:
|
# Maintainer:
|
||||||
|
|
||||||
pkgname=rp-pppoe
|
pkgname=rp-pppoe
|
||||||
pkgver=3.10
|
pkgver=3.11
|
||||||
pkgrel=6
|
pkgrel=1
|
||||||
pkgdesc="Roaring Penguin's Point-to-Point Protocol over Ethernet client"
|
pkgdesc="Roaring Penguin's Point-to-Point Protocol over Ethernet client"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://www.roaringpenguin.com/pppoe/"
|
url="http://www.roaringpenguin.com/pppoe/"
|
||||||
@ -12,29 +12,23 @@ license=('GPL')
|
|||||||
groups=('base')
|
groups=('base')
|
||||||
depends=('ppp>=2.4.5' 'sh')
|
depends=('ppp>=2.4.5' 'sh')
|
||||||
options=('!makeflags')
|
options=('!makeflags')
|
||||||
backup=(etc/ppp/pppoe.conf etc/ppp/firewall-standalone etc/ppp/firewall-masq etc/ppp/pppoe-server-options)
|
backup=(etc/ppp/{pppoe.conf,firewall-standalone,firewall-masq,pppoe-server-options})
|
||||||
source=(http://www.roaringpenguin.com/files/download/rp-pppoe-$pkgver.tar.gz adsl)
|
source=("http://www.roaringpenguin.com/files/download/rp-pppoe-${pkgver}.tar.gz"
|
||||||
install=rp-pppoe.install
|
'adsl.service')
|
||||||
md5sums=('d58a13cc4185bca6121a606ff456dec0'
|
install=${pkgname}.install
|
||||||
'adace1ad441aa88dcb3db52fb7f9c97f')
|
sha256sums=('86a1a4d92fcea74fa6dd45516c5975933fa978b36fafe71f76ea70b4b4747720'
|
||||||
|
'0247cd38b933da5033cf5229e695b29514dfc13f4c65ebd8ba03da65f4b2cff0')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $srcdir/$pkgname-$pkgver/src
|
cd "${srcdir}/${pkgname}-${pkgver}/src"
|
||||||
./configure --prefix=/usr --enable-plugin=/ppp-2.4.4
|
./configure --prefix=/usr \
|
||||||
make || return 1
|
--enable-plugin
|
||||||
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd $srcdir/$pkgname-$pkgver/src
|
cd "${srcdir}/${pkgname}-${pkgver}/src"
|
||||||
make DESTDIR=$pkgdir install
|
make PLUGIN_DIR="/usr/lib/rp-pppoe" DESTDIR="${pkgdir}" install
|
||||||
|
|
||||||
#moving .so files to /usr/lib according to FS#13876
|
install -Dm755 "${srcdir}/adsl.service" "${pkgdir}/usr/lib/systemd/system/adsl.service"
|
||||||
mkdir -p ${pkgdir}/usr/lib/rp-pppoe
|
|
||||||
mv ${pkgdir}/etc/ppp/plugins/rp-pppoe.so ${pkgdir}/usr/lib/rp-pppoe/
|
|
||||||
#not necessary after moving the plugin
|
|
||||||
rm -rf ${pkgdir}/etc/ppp/plugins
|
|
||||||
#changing config to the new path
|
|
||||||
#sed -i 's/LINUX_PLUGIN=/LINUX_PLUGIN=\/usr\/lib\/rp-pppoe\/rp-pppoe.so/g' ${pkgdir}/etc/ppp/pppoe.conf
|
|
||||||
|
|
||||||
install -Dm755 $srcdir/adsl $pkgdir/etc/rc.d/adsl
|
|
||||||
}
|
}
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
. /etc/rc.conf
|
|
||||||
. /etc/rc.d/functions
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
stat_busy "Starting ADSL Connection"
|
|
||||||
/usr/sbin/pppoe-start &>/dev/null
|
|
||||||
if [ $? -gt 0 ]; then
|
|
||||||
stat_fail
|
|
||||||
else
|
|
||||||
add_daemon adsl
|
|
||||||
stat_done
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
stat_busy "Stopping ADSL Connection"
|
|
||||||
/usr/sbin/pppoe-stop &>/dev/null
|
|
||||||
if [ $? -gt 0 ]; then
|
|
||||||
stat_fail
|
|
||||||
else
|
|
||||||
rm_daemon adsl
|
|
||||||
stat_done
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
$0 stop
|
|
||||||
sleep 1
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "usage: $0 {start|stop|restart}"
|
|
||||||
esac
|
|
||||||
exit 0
|
|
10
rp-pppoe/adsl.service
Normal file
10
rp-pppoe/adsl.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=ADSL Deamon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/sbin/pppoe-start
|
||||||
|
ExecStop=/usr/sbin/pppoe-stop
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user