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

Thomas Bächler thomas at nymeria.archlinux.org
Thu Jun 6 18:34:30 UTC 2013


    Date: Thursday, June 6, 2013 @ 20:34:30
  Author: thomas
Revision: 187833

upgpkg: ifplugd 0.28-14: remove rc.d script

Modified:
  ifplugd/trunk/PKGBUILD
Deleted:
  ifplugd/trunk/ifplugd

----------+
 PKGBUILD |   12 ++----
 ifplugd  |  105 -------------------------------------------------------------
 2 files changed, 4 insertions(+), 113 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-06-06 18:31:08 UTC (rev 187832)
+++ PKGBUILD	2013-06-06 18:34:30 UTC (rev 187833)
@@ -5,7 +5,7 @@
 
 pkgname=ifplugd
 pkgver=0.28
-pkgrel=13
+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"
@@ -13,17 +13,15 @@
 license=('GPL2')
 depends=('libdaemon' 'bash')
 backup=('etc/ifplugd/ifplugd.conf')
-options=('!makeflags')
+options=('!makeflags' '!emptydirs')
 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')
 
@@ -41,11 +39,9 @@
   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
+  # 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: ifplugd
===================================================================
--- ifplugd	2013-06-06 18:31:08 UTC (rev 187832)
+++ ifplugd	2013-06-06 18:34:30 UTC (rev 187833)
@@ -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




More information about the arch-commits mailing list