[arch-commits] Commit in ifplugd/trunk (4 files)
Thayer Williams
thayer at archlinux.org
Sun Dec 7 06:20:13 UTC 2008
Date: Sunday, December 7, 2008 @ 01:20:13
Author: thayer
Revision: 20899
upgpkg: ifplugd 0.28-4
simplified action script, PKGBUILD cleanup
Modified:
ifplugd/trunk/PKGBUILD
ifplugd/trunk/ifplugd
ifplugd/trunk/ifplugd.action
Deleted:
ifplugd/trunk/ifplugd.install
-----------------+
PKGBUILD | 42 ++++++++++++++++++++++--------------------
ifplugd | 2 ++
ifplugd.action | 42 ++++--------------------------------------
ifplugd.install | 22 ----------------------
4 files changed, 28 insertions(+), 80 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2008-12-07 06:18:22 UTC (rev 20898)
+++ PKGBUILD 2008-12-07 06:20:13 UTC (rev 20899)
@@ -1,36 +1,38 @@
# $Id$
-# Maintainer: kevin <kevin at archlinux.org>
# Contributor: Manolis Tzanidakis
+# Contributor: kevin <kevin at archlinux.org>
+# Maintainer: Thayer Williams <thayer at archlinux.org>
pkgname=ifplugd
pkgver=0.28
-pkgrel=3
+pkgrel=4
pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
+arch=('i686' 'x86_64')
url="http://0pointer.de/lennart/projects/ifplugd"
+license=('GPL2')
depends=('libdaemon' 'bash')
-install="$pkgname.install"
-backup=(etc/ifplugd/ifplugd.conf)
-source=($url/$pkgname-$pkgver.tar.gz ifplugd ifplugd.action)
-md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3' '93207aaae535301e9e45243964b19164'\
- 'a92d8dac96d920281f34b7895f31519b')
+backup=('etc/ifplugd/ifplugd.conf')
+source=($url/$pkgname-$pkgver.tar.gz 'ifplugd' 'ifplugd.action')
+md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3'
+ '70d66121ae5163348855236951e069a2'
+ '9a1f7f70e42a844131b4295aa6b9019a')
build() {
- cd $startdir/src/$pkgname-$pkgver
- ./configure --prefix=/usr --sysconfdir=/etc --with-initdir=/etc/init.d \
- --disable-xmltoman --disable-subversion --disable-lynx
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \
+ --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
/usr/bin/make || return 1
- /usr/bin/make DESTDIR=$startdir/pkg install
+ /usr/bin/make DESTDIR=$pkgdir install
- # replace INTERFACES with NET_IFS since AL
- # already uses it in /etc/rc.conf
+ # replace INTERFACES with NET_IFS since AL already uses it in /etc/rc.conf
/bin/sed -i "s:INTERFACES:NET_IFS:g" \
- $startdir/pkg/etc/ifplugd/ifplugd.conf
+ $pkgdir/etc/ifplugd/ifplugd.conf || return 1
- # replace the default init script & action
- # files with ours.
- /bin/rm -rf $startdir/pkg/etc/init.d
- /bin/install -D -m755 $startdir/ifplugd $startdir/pkg/etc/rc.d/ifplugd
- /bin/install -D -m755 $startdir/ifplugd.action \
- $startdir/pkg/etc/ifplugd/ifplugd.action
+ # replace the default init script & action files with ours.
+ #/bin/rm -rf $/pkgdir/etc/init.d
+ /bin/install -D -m755 $srcdir/ifplugd $pkgdir/etc/rc.d/ifplugd || return 1
+ /bin/install -D -m755 $srcdir/ifplugd.action \
+ $pkgdir/etc/ifplugd/ifplugd.action || return 1
}
+
# vim: ts=2 sw=2 et ft=sh
Modified: ifplugd
===================================================================
--- ifplugd 2008-12-07 06:18:22 UTC (rev 20898)
+++ ifplugd 2008-12-07 06:20:13 UTC (rev 20899)
@@ -1,4 +1,6 @@
#!/bin/bash
+#
+# ifplugd daemon script for Arch Linux
. /etc/rc.conf
. /etc/rc.d/functions
Modified: ifplugd.action
===================================================================
--- ifplugd.action 2008-12-07 06:18:22 UTC (rev 20898)
+++ ifplugd.action 2008-12-07 06:20:13 UTC (rev 20899)
@@ -1,54 +1,20 @@
#!/bin/sh
#
-# ifplugd.action for ArchLinux
-#
+# ifplugd.action script for Arch Linux
. /etc/rc.conf
+. /etc/rc.d/functions
-# wireless settings
-[ -f /etc/conf.d/wireless ] && . /etc/conf.d/wireless
-# dhcpcd settings
-[ -f /etc/conf.d/dhcpcd ] && . /etc/conf.d/dhcpcd
-
-# directly copied from /etc/rc.d/network ;-)
-ifup()
-{
- eval iwcfg="\$wlan_${1}"
- if [ "$iwcfg" != "" ]; then
- /usr/sbin/iwconfig $iwcfg
- /bin/sleep 2
- fi
- eval ifcfg="\$${1}"
- if [ "$ifcfg" = "dhcp" ]; then
- # remove the .pid file if it exists
- rm -f /etc/dhcpc/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1
- /sbin/dhcpcd $DHCPCD_ARGS ${1}
- else
- /sbin/ifconfig $ifcfg
- fi
- return $?
-}
-
-ifdown()
-{
- eval ifcfg="\$${1}"
- if [ "$ifcfg" = "dhcp" ]; then
- /bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
- fi
- /sbin/ifconfig ${1} down
- return $?
-}
-
case "$2" in
up)
- ifup $1
+ /etc/rc.d/network ifup $1
# ugly way to load up gateway, since
# al's net configuration doesn't associate
# gateways with specific interfaces
/sbin/route add $gateway
;;
down)
- ifdown $1
+ /etc/rc.d/network ifdown $1
# same as up...
/sbin/route del $1
;;
Deleted: ifplugd.install
===================================================================
--- ifplugd.install 2008-12-07 06:18:22 UTC (rev 20898)
+++ ifplugd.install 2008-12-07 06:20:13 UTC (rev 20899)
@@ -1,22 +0,0 @@
-post_install() {
- cat << EOF
-
-==> From version 0.22-1, the ifplugd pkg moved conf files in /etc/ifplugd
-==> instead of /usr/etc/ifplugd in order to be more FHS-compliant.
-==> Pls. consider moving your old conf files in the new location.
-
-EOF
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- /bin/true
-}
-
-op=$1
-shift
-
-$op $*
More information about the arch-commits
mailing list