[arch-commits] Commit in ifplugd/trunk (5 files)

Daniel Griffiths dgriffiths at archlinux.org
Mon Mar 1 22:51:10 UTC 2010


    Date: Monday, March 1, 2010 @ 17:51:10
  Author: dgriffiths
Revision: 70831

FS#16369

Added:
  ifplugd/trunk/ifdown.01-route.sh
  ifplugd/trunk/ifup.01-route.sh
  ifplugd/trunk/ifup.02-ntpdate.sh
Modified:
  ifplugd/trunk/PKGBUILD
  ifplugd/trunk/ifplugd.action

--------------------+
 PKGBUILD           |   27 ++++++++++++++++++---------
 ifdown.01-route.sh |    3 +++
 ifplugd.action     |   19 +++++++++++--------
 ifup.01-route.sh   |    5 +++++
 ifup.02-ntpdate.sh |    2 ++
 5 files changed, 39 insertions(+), 17 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-03-01 22:38:05 UTC (rev 70830)
+++ PKGBUILD	2010-03-01 22:51:10 UTC (rev 70831)
@@ -5,7 +5,7 @@
 
 pkgname=ifplugd
 pkgver=0.28
-pkgrel=6
+pkgrel=7
 pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
 arch=('i686' 'x86_64')
 url="http://0pointer.de/lennart/projects/ifplugd"
@@ -13,26 +13,35 @@
 depends=('libdaemon' 'bash')
 backup=('etc/ifplugd/ifplugd.conf' 'etc/ifplugd/ifplugd.action')
 options=('!makeflags')
-source=($url/$pkgname-$pkgver.tar.gz 'ifplugd' 'ifplugd.action' 'ifplugd-0.28-interface.patch')
+source=($url/${pkgname}-${pkgver}.tar.gz 'ifplugd' 'ifplugd.action' 'ifplugd-0.28-interface.patch' 'ifdown.01-route.sh' 'ifup.01-route.sh' 'ifup.02-ntpdate.sh')
 md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3' '70d66121ae5163348855236951e069a2'\
-         '9a1f7f70e42a844131b4295aa6b9019a' '54eb22844b5aeed161c0b80aa9008570')
+         'e91a3d77d707ae79fbc10146848032dc' '54eb22844b5aeed161c0b80aa9008570'\
+	 'd6ce6c7bd481a0b3944c944c5b277c0b' 'c35f0a637911b747f8dc3bd3c6156a1b'\
+	 'f8690ee18a5ca72555585ee96826c2cf')
 
 build() {
-  cd $srcdir/$pkgname-$pkgver
+  cd ${srcdir}/${pkgname}-${pkgver}
   patch -p0 < ../ifplugd-0.28-interface.patch
   ./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=$pkgdir install
+  /usr/bin/make DESTDIR=${pkgdir} install
 
   # replace INTERFACES with NET_IFS since AL already uses it in /etc/rc.conf
   /bin/sed -i "s:INTERFACES:NET_IFS:g" \
-      $pkgdir/etc/ifplugd/ifplugd.conf || return 1
+      ${pkgdir}/etc/ifplugd/ifplugd.conf || return 1
 
   # 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
+  /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
+
+  /bin/install -Dm755 ${srcdir}/ifdown.01-route.sh \
+      ${pkgdir}/etc/ifplugd/ifdown.d/01-route.sh || return 1
+  /bin/install -Dm755 ${srcdir}/ifup.01-route.sh \
+      ${pkgdir}/etc/ifplugd/ifup.d/01-route.sh || return 1
+  /bin/install -Dm755 ${srcdir}/ifup.02-ntpdate.sh \
+      ${pkgdir}/etc/ifplugd/ifup.d/02-ntpdate.sh || return 1
 }
 

Added: ifdown.01-route.sh
===================================================================
--- ifdown.01-route.sh	                        (rev 0)
+++ ifdown.01-route.sh	2010-03-01 22:51:10 UTC (rev 70831)
@@ -0,0 +1,3 @@
+#!/bin/sh
+# same as up...
+/sbin/route del $1
\ No newline at end of file


Property changes on: ifplugd/trunk/ifdown.01-route.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: ifplugd.action
===================================================================
--- ifplugd.action	2010-03-01 22:38:05 UTC (rev 70830)
+++ ifplugd.action	2010-03-01 22:51:10 UTC (rev 70831)
@@ -5,22 +5,25 @@
 . /etc/rc.conf
 . /etc/rc.d/functions
 
+plugscript(){ #argumets are ifup|ifdown, interface_name
+  for script in /etc/ifplugd/$1.d/*.sh; do
+    [ -x $script ] && $script $2
+  done
+  return 0
+}
+
 case "$2" in
   up)
-    /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
+    /etc/rc.d/network ifup $1
+    plugscript ifup $1
   ;;
   down)
+    plugscript ifdown $1
     /etc/rc.d/network ifdown $1
-    # same as up...
-    /sbin/route del $1
   ;;
   *)
     echo "Wrong arguments" > /dev/stderr
   ;;
-esac  
+esac
 
 exit 1

Added: ifup.01-route.sh
===================================================================
--- ifup.01-route.sh	                        (rev 0)
+++ ifup.01-route.sh	2010-03-01 22:51:10 UTC (rev 70831)
@@ -0,0 +1,5 @@
+#!/bin/sh
+# ugly way to load up gateway, since
+# al's net configuration doesn't associate
+# gateways with specific interfaces.
+/sbin/route add $gateway


Property changes on: ifplugd/trunk/ifup.01-route.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: ifup.02-ntpdate.sh
===================================================================
--- ifup.02-ntpdate.sh	                        (rev 0)
+++ ifup.02-ntpdate.sh	2010-03-01 22:51:10 UTC (rev 70831)
@@ -0,0 +1,2 @@
+#!/bin/sh
+ntpdate ru.pool.ntp.org | logger


Property changes on: ifplugd/trunk/ifup.02-ntpdate.sh
___________________________________________________________________
Added: svn:executable
   + *




More information about the arch-commits mailing list