[arch-commits] Commit in ifplugd/repos (26 files)
Thomas Bächler
thomas at nymeria.archlinux.org
Thu Jun 6 18:34:53 UTC 2013
Date: Thursday, June 6, 2013 @ 20:34:52
Author: thomas
Revision: 187834
archrelease: copy trunk to extra-i686, extra-x86_64
Added:
ifplugd/repos/extra-i686/PKGBUILD
(from rev 187833, ifplugd/trunk/PKGBUILD)
ifplugd/repos/extra-i686/ifplugd-0.28-interface.patch
(from rev 187833, ifplugd/trunk/ifplugd-0.28-interface.patch)
ifplugd/repos/extra-i686/ifplugd-daemon
(from rev 187833, ifplugd/trunk/ifplugd-daemon)
ifplugd/repos/extra-i686/ifplugd-fix-return-value.patch
(from rev 187833, ifplugd/trunk/ifplugd-fix-return-value.patch)
ifplugd/repos/extra-i686/ifplugd.install
(from rev 187833, ifplugd/trunk/ifplugd.install)
ifplugd/repos/extra-i686/ifplugd.systemd
(from rev 187833, ifplugd/trunk/ifplugd.systemd)
ifplugd/repos/extra-x86_64/PKGBUILD
(from rev 187833, ifplugd/trunk/PKGBUILD)
ifplugd/repos/extra-x86_64/ifplugd-0.28-interface.patch
(from rev 187833, ifplugd/trunk/ifplugd-0.28-interface.patch)
ifplugd/repos/extra-x86_64/ifplugd-daemon
(from rev 187833, ifplugd/trunk/ifplugd-daemon)
ifplugd/repos/extra-x86_64/ifplugd-fix-return-value.patch
(from rev 187833, ifplugd/trunk/ifplugd-fix-return-value.patch)
ifplugd/repos/extra-x86_64/ifplugd.install
(from rev 187833, ifplugd/trunk/ifplugd.install)
ifplugd/repos/extra-x86_64/ifplugd.systemd
(from rev 187833, ifplugd/trunk/ifplugd.systemd)
Deleted:
ifplugd/repos/extra-i686/PKGBUILD
ifplugd/repos/extra-i686/ifplugd
ifplugd/repos/extra-i686/ifplugd-0.28-interface.patch
ifplugd/repos/extra-i686/ifplugd-daemon
ifplugd/repos/extra-i686/ifplugd-fix-return-value.patch
ifplugd/repos/extra-i686/ifplugd.install
ifplugd/repos/extra-i686/ifplugd.systemd
ifplugd/repos/extra-x86_64/PKGBUILD
ifplugd/repos/extra-x86_64/ifplugd
ifplugd/repos/extra-x86_64/ifplugd-0.28-interface.patch
ifplugd/repos/extra-x86_64/ifplugd-daemon
ifplugd/repos/extra-x86_64/ifplugd-fix-return-value.patch
ifplugd/repos/extra-x86_64/ifplugd.install
ifplugd/repos/extra-x86_64/ifplugd.systemd
---------------------------------------------+
/PKGBUILD | 94 +++++++++++++++++++++++
/ifplugd-0.28-interface.patch | 26 ++++++
/ifplugd-daemon | 14 +++
/ifplugd-fix-return-value.patch | 24 +++++
/ifplugd.install | 26 ++++++
/ifplugd.systemd | 22 +++++
extra-i686/PKGBUILD | 51 ------------
extra-i686/ifplugd | 105 --------------------------
extra-i686/ifplugd-0.28-interface.patch | 13 ---
extra-i686/ifplugd-daemon | 7 -
extra-i686/ifplugd-fix-return-value.patch | 12 --
extra-i686/ifplugd.install | 13 ---
extra-i686/ifplugd.systemd | 11 --
extra-x86_64/PKGBUILD | 51 ------------
extra-x86_64/ifplugd | 105 --------------------------
extra-x86_64/ifplugd-0.28-interface.patch | 13 ---
extra-x86_64/ifplugd-daemon | 7 -
extra-x86_64/ifplugd-fix-return-value.patch | 12 --
extra-x86_64/ifplugd.install | 13 ---
extra-x86_64/ifplugd.systemd | 11 --
20 files changed, 206 insertions(+), 424 deletions(-)
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-i686/PKGBUILD 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,51 +0,0 @@
-# $Id$
-# Contributor: Manolis Tzanidakis
-# Contributor: kevin <kevin at archlinux.org>
-# Maintainer:
-
-pkgname=ifplugd
-pkgver=0.28
-pkgrel=13
-pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
-arch=('i686' 'x86_64')
-url="http://0pointer.de/lennart/projects/ifplugd"
-install=ifplugd.install
-license=('GPL2')
-depends=('libdaemon' 'bash')
-backup=('etc/ifplugd/ifplugd.conf')
-options=('!makeflags')
-source=($url/${pkgname}-${pkgver}.tar.gz
- ifplugd-0.28-interface.patch
- ifplugd-fix-return-value.patch
- ifplugd
- ifplugd-daemon
- ifplugd.systemd)
-md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3'
- '54eb22844b5aeed161c0b80aa9008570'
- 'f26dbd7597d9d637f0b2b104b11ab820'
- '1ea9aa64415a5a9e27b84634cd08a7f2'
- 'f2e8a37af52b79ee0e3c5bcc2470ce10'
- '3dc2ce45d0e12d155ecc7a5bc9e3ee04')
-
-build() {
- cd ${srcdir}/${pkgname}-${pkgver}
- patch -p0 -i ${srcdir}/ifplugd-0.28-interface.patch
- patch -p1 -i ${srcdir}/ifplugd-fix-return-value.patch
- sed 's|/var/run|/run|' -i src/ifplugd.c
- ./configure --prefix=/usr --sbindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc \
- --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
- make
-}
-
-package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
-
- # replace the default init script & action files with ours.
- install -D -m755 ${srcdir}/ifplugd ${pkgdir}/etc/rc.d/ifplugd
- install -D -m755 ${srcdir}/ifplugd-daemon ${pkgdir}/usr/bin/ifplugd-daemon
- # remove default action script
- rm -f ${pkgdir}/etc/ifplugd/ifplugd.action
- # install systemd unit
- install -D -m644 ${srcdir}/ifplugd.systemd ${pkgdir}/usr/lib/systemd/system/ifplugd at .service
-}
Copied: ifplugd/repos/extra-i686/PKGBUILD (from rev 187833, ifplugd/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,47 @@
+# $Id$
+# Contributor: Manolis Tzanidakis
+# Contributor: kevin <kevin at archlinux.org>
+# Maintainer:
+
+pkgname=ifplugd
+pkgver=0.28
+pkgrel=14
+pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
+arch=('i686' 'x86_64')
+url="http://0pointer.de/lennart/projects/ifplugd"
+install=ifplugd.install
+license=('GPL2')
+depends=('libdaemon' 'bash')
+backup=('etc/ifplugd/ifplugd.conf')
+options=('!makeflags' '!emptydirs')
+source=($url/${pkgname}-${pkgver}.tar.gz
+ ifplugd-0.28-interface.patch
+ ifplugd-fix-return-value.patch
+ ifplugd-daemon
+ ifplugd.systemd)
+md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3'
+ '54eb22844b5aeed161c0b80aa9008570'
+ 'f26dbd7597d9d637f0b2b104b11ab820'
+ 'f2e8a37af52b79ee0e3c5bcc2470ce10'
+ '3dc2ce45d0e12d155ecc7a5bc9e3ee04')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p0 -i ${srcdir}/ifplugd-0.28-interface.patch
+ patch -p1 -i ${srcdir}/ifplugd-fix-return-value.patch
+ sed 's|/var/run|/run|' -i src/ifplugd.c
+ ./configure --prefix=/usr --sbindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc \
+ --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ install -D -m755 ${srcdir}/ifplugd-daemon ${pkgdir}/usr/bin/ifplugd-daemon
+ # remove the default init script and action script
+ rm -f ${pkgdir}/etc/{ifplugd/ifplugd.action,rc.d/ifplugd}
+ # install systemd unit
+ install -D -m644 ${srcdir}/ifplugd.systemd ${pkgdir}/usr/lib/systemd/system/ifplugd at .service
+}
Deleted: extra-i686/ifplugd
===================================================================
--- extra-i686/ifplugd 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-i686/ifplugd 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,105 +0,0 @@
-#!/bin/bash
-#
-# ifplugd daemon script for Arch Linux
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-shopt -s extglob
-
-# env vars
-daemonname=ifplugd
-cfg=/etc/ifplugd/ifplugd.conf
-PID=$(pidof -o %PPID ifplugd)
-
-# source configuration file
-[[ -r $cfg ]] && . "$cfg"
-
-# discover interfaces to monitor
-net_ifs=($INTERFACES)
-
-case $1 in
- start)
- stat_busy "Starting $daemonname: ${net_ifs[*]}"
-
- for nic in "${net_ifs[@]}"; do
- # only start if a PID doesn't already exist
- if [[ ! -f /var/run/ifplugd.$nic.pid ]]; then
- /usr/bin/ifplugd-daemon $nic
-
- # use presence of PID file to check for start success
- [[ -f /var/run/ifplugd.$nic.pid ]] || (( ++err ))
- fi
- done
- unset nic
-
- if (( err )); then
- stat_fail
- exit 1
- else
- add_daemon $daemonname
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping $daemonname: ${net_ifs[*]}"
-
- for nic in /var/run/ifplugd.*.pid; do
- [[ -f $nic ]] || { (( ++err )); break; }
- nic=${nic%.pid}
- nic=${nic##*.}
- ifplugd -k -i "$nic" || (( ++err ))
- done
-
- if (( err )); then
- stat_fail
- exit 1
- else
- rm_daemon $daemonname
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- status)
- for nic in "${net_ifs[@]}"; do
- ifplugd -c -i "$nic"
- done
- unset nic
- ;;
- suspend)
- stat_busy "Suspending $daemonname: ${net_ifs[*]}"
- for nic in "${net_ifs[@]}"; do
- ifplugd -S -i $nic || (( ++err ))
- done
- unset nic
-
- if (( err )); then
- stat_fail
- exit 1
- else
- stat_done
- fi
- ;;
- resume)
- stat_busy "Resuming $daemonname ${net_ifs[*]}"
-
- for nic in "${net_ifs[@]}"; do
- ifplugd -R -i $nic || (( ++err ))
- done
- unset nic
-
- if (( err )); then
- stat_fail
- exit 1
- else
- stat_done
- fi
- ;;
- *)
- echo "usage: $0 {start|stop|restart|status|suspend|resume}"
-esac
-exit 0
Deleted: extra-i686/ifplugd-0.28-interface.patch
===================================================================
--- extra-i686/ifplugd-0.28-interface.patch 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-i686/ifplugd-0.28-interface.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,13 +0,0 @@
---- src/interface.c 2004/12/19 00:08:01 114
-+++ src/interface.c 2006/03/07 13:15:11 133
-@@ -22,9 +22,9 @@
- #include <config.h>
- #endif
-
-+#include <sys/types.h>
- #include <linux/sockios.h>
- #include <linux/if_ether.h>
--#include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <linux/if.h>
Copied: ifplugd/repos/extra-i686/ifplugd-0.28-interface.patch (from rev 187833, ifplugd/trunk/ifplugd-0.28-interface.patch)
===================================================================
--- extra-i686/ifplugd-0.28-interface.patch (rev 0)
+++ extra-i686/ifplugd-0.28-interface.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,13 @@
+--- src/interface.c 2004/12/19 00:08:01 114
++++ src/interface.c 2006/03/07 13:15:11 133
+@@ -22,9 +22,9 @@
+ #include <config.h>
+ #endif
+
++#include <sys/types.h>
+ #include <linux/sockios.h>
+ #include <linux/if_ether.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <linux/if.h>
Deleted: extra-i686/ifplugd-daemon
===================================================================
--- extra-i686/ifplugd-daemon 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-i686/ifplugd-daemon 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-. /etc/ifplugd/ifplugd.conf
-
-args=ARGS_$1
-[[ -z ${!args} ]] && args=$ARGS || args=${!args}
-/usr/bin/ifplugd -i "$1" $args
Copied: ifplugd/repos/extra-i686/ifplugd-daemon (from rev 187833, ifplugd/trunk/ifplugd-daemon)
===================================================================
--- extra-i686/ifplugd-daemon (rev 0)
+++ extra-i686/ifplugd-daemon 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+. /etc/ifplugd/ifplugd.conf
+
+args=ARGS_$1
+[[ -z ${!args} ]] && args=$ARGS || args=${!args}
+/usr/bin/ifplugd -i "$1" $args
Deleted: extra-i686/ifplugd-fix-return-value.patch
===================================================================
--- extra-i686/ifplugd-fix-return-value.patch 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-i686/ifplugd-fix-return-value.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,12 +0,0 @@
-diff -Nur ifplugd-0.28.orig/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
---- ifplugd-0.28.orig/src/ifplugd.c 2005-06-04 21:21:51.000000000 +0200
-+++ ifplugd-0.28/src/ifplugd.c 2012-08-29 21:51:53.137644163 +0200
-@@ -447,7 +447,7 @@
- goto finish;
-
- if (send_retval && daemonize && wait_on_fork) {
-- char c = status == IFSTATUS_UP ? 2 : (status == IFSTATUS_DOWN ? 3 : 1);
-+ char c = status == IFSTATUS_UP ? 1 : (status == IFSTATUS_DOWN ? 2 : 3);
- daemon_retval_send(c);
- send_retval = 0;
- }
Copied: ifplugd/repos/extra-i686/ifplugd-fix-return-value.patch (from rev 187833, ifplugd/trunk/ifplugd-fix-return-value.patch)
===================================================================
--- extra-i686/ifplugd-fix-return-value.patch (rev 0)
+++ extra-i686/ifplugd-fix-return-value.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,12 @@
+diff -Nur ifplugd-0.28.orig/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
+--- ifplugd-0.28.orig/src/ifplugd.c 2005-06-04 21:21:51.000000000 +0200
++++ ifplugd-0.28/src/ifplugd.c 2012-08-29 21:51:53.137644163 +0200
+@@ -447,7 +447,7 @@
+ goto finish;
+
+ if (send_retval && daemonize && wait_on_fork) {
+- char c = status == IFSTATUS_UP ? 2 : (status == IFSTATUS_DOWN ? 3 : 1);
++ char c = status == IFSTATUS_UP ? 1 : (status == IFSTATUS_DOWN ? 2 : 3);
+ daemon_retval_send(c);
+ send_retval = 0;
+ }
Deleted: extra-i686/ifplugd.install
===================================================================
--- extra-i686/ifplugd.install 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-i686/ifplugd.install 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,13 +0,0 @@
-post_upgrade() {
- if [ $(vercmp $2 0.28-12) -lt 0 ]; then
- cat << "EOF"
-* When used with initscripts, /etc/ifplugd/ifplugd.conf now uses
- INTERFACES= again instead of NET_IFS=.
-* This package no longer provides a default ifplugd.action script.
-* To use ifplugd with systemd, run
- systemctl enable ifplugd at eth0.service
-EOF
- fi
-}
-
-# vim:set ts=2 sw=2 et:
Copied: ifplugd/repos/extra-i686/ifplugd.install (from rev 187833, ifplugd/trunk/ifplugd.install)
===================================================================
--- extra-i686/ifplugd.install (rev 0)
+++ extra-i686/ifplugd.install 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,13 @@
+post_upgrade() {
+ if [ $(vercmp $2 0.28-12) -lt 0 ]; then
+ cat << "EOF"
+* When used with initscripts, /etc/ifplugd/ifplugd.conf now uses
+ INTERFACES= again instead of NET_IFS=.
+* This package no longer provides a default ifplugd.action script.
+* To use ifplugd with systemd, run
+ systemctl enable ifplugd at eth0.service
+EOF
+ fi
+}
+
+# vim:set ts=2 sw=2 et:
Deleted: extra-i686/ifplugd.systemd
===================================================================
--- extra-i686/ifplugd.systemd 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-i686/ifplugd.systemd 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,11 +0,0 @@
-[Unit]
-Description=Daemon which acts upon network cable insertion/removal
-
-[Service]
-Type=forking
-PIDFile=/run/ifplugd.%i.pid
-ExecStart=/usr/bin/ifplugd-daemon %i
-SuccessExitStatus=0 1 2
-
-[Install]
-WantedBy=multi-user.target
Copied: ifplugd/repos/extra-i686/ifplugd.systemd (from rev 187833, ifplugd/trunk/ifplugd.systemd)
===================================================================
--- extra-i686/ifplugd.systemd (rev 0)
+++ extra-i686/ifplugd.systemd 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daemon which acts upon network cable insertion/removal
+
+[Service]
+Type=forking
+PIDFile=/run/ifplugd.%i.pid
+ExecStart=/usr/bin/ifplugd-daemon %i
+SuccessExitStatus=0 1 2
+
+[Install]
+WantedBy=multi-user.target
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-x86_64/PKGBUILD 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,51 +0,0 @@
-# $Id$
-# Contributor: Manolis Tzanidakis
-# Contributor: kevin <kevin at archlinux.org>
-# Maintainer:
-
-pkgname=ifplugd
-pkgver=0.28
-pkgrel=13
-pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
-arch=('i686' 'x86_64')
-url="http://0pointer.de/lennart/projects/ifplugd"
-install=ifplugd.install
-license=('GPL2')
-depends=('libdaemon' 'bash')
-backup=('etc/ifplugd/ifplugd.conf')
-options=('!makeflags')
-source=($url/${pkgname}-${pkgver}.tar.gz
- ifplugd-0.28-interface.patch
- ifplugd-fix-return-value.patch
- ifplugd
- ifplugd-daemon
- ifplugd.systemd)
-md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3'
- '54eb22844b5aeed161c0b80aa9008570'
- 'f26dbd7597d9d637f0b2b104b11ab820'
- '1ea9aa64415a5a9e27b84634cd08a7f2'
- 'f2e8a37af52b79ee0e3c5bcc2470ce10'
- '3dc2ce45d0e12d155ecc7a5bc9e3ee04')
-
-build() {
- cd ${srcdir}/${pkgname}-${pkgver}
- patch -p0 -i ${srcdir}/ifplugd-0.28-interface.patch
- patch -p1 -i ${srcdir}/ifplugd-fix-return-value.patch
- sed 's|/var/run|/run|' -i src/ifplugd.c
- ./configure --prefix=/usr --sbindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc \
- --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
- make
-}
-
-package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
-
- # replace the default init script & action files with ours.
- install -D -m755 ${srcdir}/ifplugd ${pkgdir}/etc/rc.d/ifplugd
- install -D -m755 ${srcdir}/ifplugd-daemon ${pkgdir}/usr/bin/ifplugd-daemon
- # remove default action script
- rm -f ${pkgdir}/etc/ifplugd/ifplugd.action
- # install systemd unit
- install -D -m644 ${srcdir}/ifplugd.systemd ${pkgdir}/usr/lib/systemd/system/ifplugd at .service
-}
Copied: ifplugd/repos/extra-x86_64/PKGBUILD (from rev 187833, ifplugd/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,47 @@
+# $Id$
+# Contributor: Manolis Tzanidakis
+# Contributor: kevin <kevin at archlinux.org>
+# Maintainer:
+
+pkgname=ifplugd
+pkgver=0.28
+pkgrel=14
+pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
+arch=('i686' 'x86_64')
+url="http://0pointer.de/lennart/projects/ifplugd"
+install=ifplugd.install
+license=('GPL2')
+depends=('libdaemon' 'bash')
+backup=('etc/ifplugd/ifplugd.conf')
+options=('!makeflags' '!emptydirs')
+source=($url/${pkgname}-${pkgver}.tar.gz
+ ifplugd-0.28-interface.patch
+ ifplugd-fix-return-value.patch
+ ifplugd-daemon
+ ifplugd.systemd)
+md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3'
+ '54eb22844b5aeed161c0b80aa9008570'
+ 'f26dbd7597d9d637f0b2b104b11ab820'
+ 'f2e8a37af52b79ee0e3c5bcc2470ce10'
+ '3dc2ce45d0e12d155ecc7a5bc9e3ee04')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p0 -i ${srcdir}/ifplugd-0.28-interface.patch
+ patch -p1 -i ${srcdir}/ifplugd-fix-return-value.patch
+ sed 's|/var/run|/run|' -i src/ifplugd.c
+ ./configure --prefix=/usr --sbindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc \
+ --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ install -D -m755 ${srcdir}/ifplugd-daemon ${pkgdir}/usr/bin/ifplugd-daemon
+ # remove the default init script and action script
+ rm -f ${pkgdir}/etc/{ifplugd/ifplugd.action,rc.d/ifplugd}
+ # install systemd unit
+ install -D -m644 ${srcdir}/ifplugd.systemd ${pkgdir}/usr/lib/systemd/system/ifplugd at .service
+}
Deleted: extra-x86_64/ifplugd
===================================================================
--- extra-x86_64/ifplugd 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-x86_64/ifplugd 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,105 +0,0 @@
-#!/bin/bash
-#
-# ifplugd daemon script for Arch Linux
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-shopt -s extglob
-
-# env vars
-daemonname=ifplugd
-cfg=/etc/ifplugd/ifplugd.conf
-PID=$(pidof -o %PPID ifplugd)
-
-# source configuration file
-[[ -r $cfg ]] && . "$cfg"
-
-# discover interfaces to monitor
-net_ifs=($INTERFACES)
-
-case $1 in
- start)
- stat_busy "Starting $daemonname: ${net_ifs[*]}"
-
- for nic in "${net_ifs[@]}"; do
- # only start if a PID doesn't already exist
- if [[ ! -f /var/run/ifplugd.$nic.pid ]]; then
- /usr/bin/ifplugd-daemon $nic
-
- # use presence of PID file to check for start success
- [[ -f /var/run/ifplugd.$nic.pid ]] || (( ++err ))
- fi
- done
- unset nic
-
- if (( err )); then
- stat_fail
- exit 1
- else
- add_daemon $daemonname
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping $daemonname: ${net_ifs[*]}"
-
- for nic in /var/run/ifplugd.*.pid; do
- [[ -f $nic ]] || { (( ++err )); break; }
- nic=${nic%.pid}
- nic=${nic##*.}
- ifplugd -k -i "$nic" || (( ++err ))
- done
-
- if (( err )); then
- stat_fail
- exit 1
- else
- rm_daemon $daemonname
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- status)
- for nic in "${net_ifs[@]}"; do
- ifplugd -c -i "$nic"
- done
- unset nic
- ;;
- suspend)
- stat_busy "Suspending $daemonname: ${net_ifs[*]}"
- for nic in "${net_ifs[@]}"; do
- ifplugd -S -i $nic || (( ++err ))
- done
- unset nic
-
- if (( err )); then
- stat_fail
- exit 1
- else
- stat_done
- fi
- ;;
- resume)
- stat_busy "Resuming $daemonname ${net_ifs[*]}"
-
- for nic in "${net_ifs[@]}"; do
- ifplugd -R -i $nic || (( ++err ))
- done
- unset nic
-
- if (( err )); then
- stat_fail
- exit 1
- else
- stat_done
- fi
- ;;
- *)
- echo "usage: $0 {start|stop|restart|status|suspend|resume}"
-esac
-exit 0
Deleted: extra-x86_64/ifplugd-0.28-interface.patch
===================================================================
--- extra-x86_64/ifplugd-0.28-interface.patch 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-x86_64/ifplugd-0.28-interface.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,13 +0,0 @@
---- src/interface.c 2004/12/19 00:08:01 114
-+++ src/interface.c 2006/03/07 13:15:11 133
-@@ -22,9 +22,9 @@
- #include <config.h>
- #endif
-
-+#include <sys/types.h>
- #include <linux/sockios.h>
- #include <linux/if_ether.h>
--#include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <linux/if.h>
Copied: ifplugd/repos/extra-x86_64/ifplugd-0.28-interface.patch (from rev 187833, ifplugd/trunk/ifplugd-0.28-interface.patch)
===================================================================
--- extra-x86_64/ifplugd-0.28-interface.patch (rev 0)
+++ extra-x86_64/ifplugd-0.28-interface.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,13 @@
+--- src/interface.c 2004/12/19 00:08:01 114
++++ src/interface.c 2006/03/07 13:15:11 133
+@@ -22,9 +22,9 @@
+ #include <config.h>
+ #endif
+
++#include <sys/types.h>
+ #include <linux/sockios.h>
+ #include <linux/if_ether.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <linux/if.h>
Deleted: extra-x86_64/ifplugd-daemon
===================================================================
--- extra-x86_64/ifplugd-daemon 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-x86_64/ifplugd-daemon 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-. /etc/ifplugd/ifplugd.conf
-
-args=ARGS_$1
-[[ -z ${!args} ]] && args=$ARGS || args=${!args}
-/usr/bin/ifplugd -i "$1" $args
Copied: ifplugd/repos/extra-x86_64/ifplugd-daemon (from rev 187833, ifplugd/trunk/ifplugd-daemon)
===================================================================
--- extra-x86_64/ifplugd-daemon (rev 0)
+++ extra-x86_64/ifplugd-daemon 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+. /etc/ifplugd/ifplugd.conf
+
+args=ARGS_$1
+[[ -z ${!args} ]] && args=$ARGS || args=${!args}
+/usr/bin/ifplugd -i "$1" $args
Deleted: extra-x86_64/ifplugd-fix-return-value.patch
===================================================================
--- extra-x86_64/ifplugd-fix-return-value.patch 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-x86_64/ifplugd-fix-return-value.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,12 +0,0 @@
-diff -Nur ifplugd-0.28.orig/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
---- ifplugd-0.28.orig/src/ifplugd.c 2005-06-04 21:21:51.000000000 +0200
-+++ ifplugd-0.28/src/ifplugd.c 2012-08-29 21:51:53.137644163 +0200
-@@ -447,7 +447,7 @@
- goto finish;
-
- if (send_retval && daemonize && wait_on_fork) {
-- char c = status == IFSTATUS_UP ? 2 : (status == IFSTATUS_DOWN ? 3 : 1);
-+ char c = status == IFSTATUS_UP ? 1 : (status == IFSTATUS_DOWN ? 2 : 3);
- daemon_retval_send(c);
- send_retval = 0;
- }
Copied: ifplugd/repos/extra-x86_64/ifplugd-fix-return-value.patch (from rev 187833, ifplugd/trunk/ifplugd-fix-return-value.patch)
===================================================================
--- extra-x86_64/ifplugd-fix-return-value.patch (rev 0)
+++ extra-x86_64/ifplugd-fix-return-value.patch 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,12 @@
+diff -Nur ifplugd-0.28.orig/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
+--- ifplugd-0.28.orig/src/ifplugd.c 2005-06-04 21:21:51.000000000 +0200
++++ ifplugd-0.28/src/ifplugd.c 2012-08-29 21:51:53.137644163 +0200
+@@ -447,7 +447,7 @@
+ goto finish;
+
+ if (send_retval && daemonize && wait_on_fork) {
+- char c = status == IFSTATUS_UP ? 2 : (status == IFSTATUS_DOWN ? 3 : 1);
++ char c = status == IFSTATUS_UP ? 1 : (status == IFSTATUS_DOWN ? 2 : 3);
+ daemon_retval_send(c);
+ send_retval = 0;
+ }
Deleted: extra-x86_64/ifplugd.install
===================================================================
--- extra-x86_64/ifplugd.install 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-x86_64/ifplugd.install 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,13 +0,0 @@
-post_upgrade() {
- if [ $(vercmp $2 0.28-12) -lt 0 ]; then
- cat << "EOF"
-* When used with initscripts, /etc/ifplugd/ifplugd.conf now uses
- INTERFACES= again instead of NET_IFS=.
-* This package no longer provides a default ifplugd.action script.
-* To use ifplugd with systemd, run
- systemctl enable ifplugd at eth0.service
-EOF
- fi
-}
-
-# vim:set ts=2 sw=2 et:
Copied: ifplugd/repos/extra-x86_64/ifplugd.install (from rev 187833, ifplugd/trunk/ifplugd.install)
===================================================================
--- extra-x86_64/ifplugd.install (rev 0)
+++ extra-x86_64/ifplugd.install 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,13 @@
+post_upgrade() {
+ if [ $(vercmp $2 0.28-12) -lt 0 ]; then
+ cat << "EOF"
+* When used with initscripts, /etc/ifplugd/ifplugd.conf now uses
+ INTERFACES= again instead of NET_IFS=.
+* This package no longer provides a default ifplugd.action script.
+* To use ifplugd with systemd, run
+ systemctl enable ifplugd at eth0.service
+EOF
+ fi
+}
+
+# vim:set ts=2 sw=2 et:
Deleted: extra-x86_64/ifplugd.systemd
===================================================================
--- extra-x86_64/ifplugd.systemd 2013-06-06 18:34:30 UTC (rev 187833)
+++ extra-x86_64/ifplugd.systemd 2013-06-06 18:34:52 UTC (rev 187834)
@@ -1,11 +0,0 @@
-[Unit]
-Description=Daemon which acts upon network cable insertion/removal
-
-[Service]
-Type=forking
-PIDFile=/run/ifplugd.%i.pid
-ExecStart=/usr/bin/ifplugd-daemon %i
-SuccessExitStatus=0 1 2
-
-[Install]
-WantedBy=multi-user.target
Copied: ifplugd/repos/extra-x86_64/ifplugd.systemd (from rev 187833, ifplugd/trunk/ifplugd.systemd)
===================================================================
--- extra-x86_64/ifplugd.systemd (rev 0)
+++ extra-x86_64/ifplugd.systemd 2013-06-06 18:34:52 UTC (rev 187834)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daemon which acts upon network cable insertion/removal
+
+[Service]
+Type=forking
+PIDFile=/run/ifplugd.%i.pid
+ExecStart=/usr/bin/ifplugd-daemon %i
+SuccessExitStatus=0 1 2
+
+[Install]
+WantedBy=multi-user.target
More information about the arch-commits
mailing list