ports/contrib (3.3): networkmanager: 1.0.10 -> 1.6.2
commit 17383bbc1a382337b2da082b1823c38915b3c4b4 Author: Alan Mizrahi <alan+crux@mizrahi.com.ve> Date: Fri Mar 3 20:21:46 2017 +0900 networkmanager: 1.0.10 -> 1.6.2 - use start-stop-daemon - fix udev dir - keep bash-completion config, if in use - updated README diff --git a/networkmanager/.footprint b/networkmanager/.footprint index b828a89..dac76e0 100644 --- a/networkmanager/.footprint +++ b/networkmanager/.footprint @@ -1,9 +1,13 @@ drwxr-xr-x root/root etc/ drwxr-xr-x root/root etc/NetworkManager/ -rw-r--r-- root/root etc/NetworkManager/NetworkManager.conf +drwxr-xr-x root/root etc/NetworkManager/conf.d/ drwxr-xr-x root/root etc/NetworkManager/dispatcher.d/ +drwxr-xr-x root/root etc/NetworkManager/dispatcher.d/no-wait.d/ drwxr-xr-x root/root etc/NetworkManager/dispatcher.d/pre-down.d/ drwxr-xr-x root/root etc/NetworkManager/dispatcher.d/pre-up.d/ +drwxr-xr-x root/root etc/NetworkManager/dnsmasq-shared.d/ +drwxr-xr-x root/root etc/NetworkManager/dnsmasq.d/ drwxr-xr-x root/root etc/NetworkManager/system-connections/ drwxr-xr-x root/root etc/rc.d/ -rwxr-xr-x root/root etc/rc.d/networkmanager @@ -19,7 +23,6 @@ drwxr-xr-x root/root usr/bin/ drwxr-xr-x root/root usr/etc/ drwxr-xr-x root/root usr/etc/dbus-1/ drwxr-xr-x root/root usr/etc/dbus-1/system.d/ --rw-r--r-- root/root usr/etc/dbus-1/system.d/nm-avahi-autoipd.conf -rw-r--r-- root/root usr/etc/dbus-1/system.d/nm-dispatcher.conf -rw-r--r-- root/root usr/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf drwxr-xr-x root/root usr/include/ @@ -109,10 +112,15 @@ drwxr-xr-x root/root usr/include/libnm/ -rw-r--r-- root/root usr/include/libnm/nm-device-ethernet.h -rw-r--r-- root/root usr/include/libnm/nm-device-generic.h -rw-r--r-- root/root usr/include/libnm/nm-device-infiniband.h +-rw-r--r-- root/root usr/include/libnm/nm-device-ip-tunnel.h +-rw-r--r-- root/root usr/include/libnm/nm-device-macsec.h +-rw-r--r-- root/root usr/include/libnm/nm-device-macvlan.h -rw-r--r-- root/root usr/include/libnm/nm-device-modem.h -rw-r--r-- root/root usr/include/libnm/nm-device-olpc-mesh.h -rw-r--r-- root/root usr/include/libnm/nm-device-team.h +-rw-r--r-- root/root usr/include/libnm/nm-device-tun.h -rw-r--r-- root/root usr/include/libnm/nm-device-vlan.h +-rw-r--r-- root/root usr/include/libnm/nm-device-vxlan.h -rw-r--r-- root/root usr/include/libnm/nm-device-wifi.h -rw-r--r-- root/root usr/include/libnm/nm-device-wimax.h -rw-r--r-- root/root usr/include/libnm/nm-device.h @@ -136,16 +144,22 @@ drwxr-xr-x root/root usr/include/libnm/ -rw-r--r-- root/root usr/include/libnm/nm-setting-gsm.h -rw-r--r-- root/root usr/include/libnm/nm-setting-infiniband.h -rw-r--r-- root/root usr/include/libnm/nm-setting-ip-config.h +-rw-r--r-- root/root usr/include/libnm/nm-setting-ip-tunnel.h -rw-r--r-- root/root usr/include/libnm/nm-setting-ip4-config.h -rw-r--r-- root/root usr/include/libnm/nm-setting-ip6-config.h +-rw-r--r-- root/root usr/include/libnm/nm-setting-macsec.h +-rw-r--r-- root/root usr/include/libnm/nm-setting-macvlan.h -rw-r--r-- root/root usr/include/libnm/nm-setting-olpc-mesh.h -rw-r--r-- root/root usr/include/libnm/nm-setting-ppp.h -rw-r--r-- root/root usr/include/libnm/nm-setting-pppoe.h +-rw-r--r-- root/root usr/include/libnm/nm-setting-proxy.h -rw-r--r-- root/root usr/include/libnm/nm-setting-serial.h -rw-r--r-- root/root usr/include/libnm/nm-setting-team-port.h -rw-r--r-- root/root usr/include/libnm/nm-setting-team.h +-rw-r--r-- root/root usr/include/libnm/nm-setting-tun.h -rw-r--r-- root/root usr/include/libnm/nm-setting-vlan.h -rw-r--r-- root/root usr/include/libnm/nm-setting-vpn.h +-rw-r--r-- root/root usr/include/libnm/nm-setting-vxlan.h -rw-r--r-- root/root usr/include/libnm/nm-setting-wimax.h -rw-r--r-- root/root usr/include/libnm/nm-setting-wired.h -rw-r--r-- root/root usr/include/libnm/nm-setting-wireless-security.h @@ -159,20 +173,23 @@ drwxr-xr-x root/root usr/include/libnm/ -rw-r--r-- root/root usr/include/libnm/nm-vpn-connection.h -rw-r--r-- root/root usr/include/libnm/nm-vpn-dbus-interface.h -rw-r--r-- root/root usr/include/libnm/nm-vpn-editor-plugin.h +-rw-r--r-- root/root usr/include/libnm/nm-vpn-editor.h +-rw-r--r-- root/root usr/include/libnm/nm-vpn-plugin-info.h -rw-r--r-- root/root usr/include/libnm/nm-vpn-plugin-old.h +-rw-r--r-- root/root usr/include/libnm/nm-vpn-service-plugin.h -rw-r--r-- root/root usr/include/libnm/nm-wimax-nsp.h drwxr-xr-x root/root usr/lib/ drwxr-xr-x root/root usr/lib/NetworkManager/ +drwxr-xr-x root/root usr/lib/NetworkManager/VPN/ +drwxr-xr-x root/root usr/lib/NetworkManager/conf.d/ -rwxr-xr-x root/root usr/lib/NetworkManager/libnm-device-plugin-adsl.la -rwxr-xr-x root/root usr/lib/NetworkManager/libnm-device-plugin-adsl.so -rwxr-xr-x root/root usr/lib/NetworkManager/libnm-device-plugin-wifi.la -rwxr-xr-x root/root usr/lib/NetworkManager/libnm-device-plugin-wifi.so +-rwxr-xr-x root/root usr/lib/NetworkManager/libnm-ppp-plugin.la +-rwxr-xr-x root/root usr/lib/NetworkManager/libnm-ppp-plugin.so -rwxr-xr-x root/root usr/lib/NetworkManager/libnm-settings-plugin-ibft.la -rwxr-xr-x root/root usr/lib/NetworkManager/libnm-settings-plugin-ibft.so -drwxr-xr-x root/root usr/lib/girepository-1.0/ --rw-r--r-- root/root usr/lib/girepository-1.0/NM-1.0.typelib --rw-r--r-- root/root usr/lib/girepository-1.0/NMClient-1.0.typelib --rw-r--r-- root/root usr/lib/girepository-1.0/NetworkManager-1.0.typelib -rwxr-xr-x root/root usr/lib/libnm-glib-vpn.la lrwxrwxrwx root/root usr/lib/libnm-glib-vpn.so -> libnm-glib-vpn.so.1.2.0 lrwxrwxrwx root/root usr/lib/libnm-glib-vpn.so.1 -> libnm-glib-vpn.so.1.2.0 @@ -186,11 +203,10 @@ lrwxrwxrwx root/root usr/lib/libnm-util.so -> libnm-util.so.2.7.0 lrwxrwxrwx root/root usr/lib/libnm-util.so.2 -> libnm-util.so.2.7.0 -rwxr-xr-x root/root usr/lib/libnm-util.so.2.7.0 -rwxr-xr-x root/root usr/lib/libnm.la -lrwxrwxrwx root/root usr/lib/libnm.so -> libnm.so.0.0.0 -lrwxrwxrwx root/root usr/lib/libnm.so.0 -> libnm.so.0.0.0 --rwxr-xr-x root/root usr/lib/libnm.so.0.0.0 +lrwxrwxrwx root/root usr/lib/libnm.so -> libnm.so.0.1.0 +lrwxrwxrwx root/root usr/lib/libnm.so.0 -> libnm.so.0.1.0 +-rwxr-xr-x root/root usr/lib/libnm.so.0.1.0 drwxr-xr-x root/root usr/lib/networkmanager/ --rwxr-xr-x root/root usr/lib/networkmanager/nm-avahi-autoipd.action -rwxr-xr-x root/root usr/lib/networkmanager/nm-dhcp-helper -rwxr-xr-x root/root usr/lib/networkmanager/nm-dispatcher -rwxr-xr-x root/root usr/lib/networkmanager/nm-iface-helper @@ -208,26 +224,60 @@ drwxr-xr-x root/root usr/sbin/ -rwxr-xr-x root/root usr/sbin/NetworkManager drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/dbus-1/ +drwxr-xr-x root/root usr/share/dbus-1/interfaces/ +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.AccessPoint.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.AgentManager.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Checkpoint.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Connection.Active.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.DHCP4Config.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.DHCP6Config.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Adsl.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Bluetooth.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Bond.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Bridge.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Generic.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.IPTunnel.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Infiniband.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Macsec.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Macvlan.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Modem.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.OlpcMesh.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Statistics.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Team.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Tun.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Veth.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Vlan.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Vxlan.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.WiMax.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Wired.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.Wireless.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Device.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.DnsManager.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.IP4Config.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.IP6Config.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.PPP.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.SecretAgent.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Settings.Connection.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.Settings.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.VPN.Connection.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.VPN.Plugin.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.WiMax.Nsp.xml +-rw-r--r-- root/root usr/share/dbus-1/interfaces/org.freedesktop.NetworkManager.xml drwxr-xr-x root/root usr/share/dbus-1/system-services/ -rw-r--r-- root/root usr/share/dbus-1/system-services/org.freedesktop.nm_dispatcher.service drwxr-xr-x root/root usr/share/gir-1.0/ --rw-r--r-- root/root usr/share/gir-1.0/NM-1.0.gir --rw-r--r-- root/root usr/share/gir-1.0/NMClient-1.0.gir --rw-r--r-- root/root usr/share/gir-1.0/NetworkManager-1.0.gir drwxr-xr-x root/root usr/share/man/ drwxr-xr-x root/root usr/share/man/man1/ -rw-r--r-- root/root usr/share/man/man1/nm-online.1.gz -rw-r--r-- root/root usr/share/man/man1/nmcli.1.gz --rw-r--r-- root/root usr/share/man/man1/nmtui-connect.1 --rw-r--r-- root/root usr/share/man/man1/nmtui-edit.1 --rw-r--r-- root/root usr/share/man/man1/nmtui-hostname.1 --rw-r--r-- root/root usr/share/man/man1/nmtui.1 +-rw-r--r-- root/root usr/share/man/man1/nmtui.1.gz drwxr-xr-x root/root usr/share/man/man5/ --rw-r--r-- root/root usr/share/man/man5/NetworkManager.conf.5.gz --rw-r--r-- root/root usr/share/man/man5/nm-settings-ifcfg-rh.5.gz +-rw-r--r-- root/root usr/share/man/man5/NetworkManager.conf.5 -rw-r--r-- root/root usr/share/man/man5/nm-settings-keyfile.5.gz -rw-r--r-- root/root usr/share/man/man5/nm-settings.5.gz --rw-r--r-- root/root usr/share/man/man5/nm-system-settings.conf.5.gz +-rw-r--r-- root/root usr/share/man/man5/nm-system-settings.conf.5 +drwxr-xr-x root/root usr/share/man/man7/ +-rw-r--r-- root/root usr/share/man/man7/nmcli-examples.7.gz drwxr-xr-x root/root usr/share/man/man8/ -rw-r--r-- root/root usr/share/man/man8/NetworkManager.8.gz drwxr-xr-x root/root usr/share/polkit-1/ diff --git a/networkmanager/.md5sum b/networkmanager/.md5sum index bda28ae..c388a66 100644 --- a/networkmanager/.md5sum +++ b/networkmanager/.md5sum @@ -1,3 +1,3 @@ -a8f54460a4708efd840358f32d0968fd NetworkManager-1.0.10.tar.xz +89c975afe19fbac854191edb6e9bcd3b NetworkManager-1.6.2.tar.xz 49dd5996e5a9a7f825e75501a8eb3066 NetworkManager.conf -4c67731690b2f4718791c7f8c8940aa2 networkmanager.rc +50aaf6583e7f2941d167ae29795b26f0 networkmanager.rc diff --git a/networkmanager/.signature b/networkmanager/.signature index db19fc4..9258b2d 100644 --- a/networkmanager/.signature +++ b/networkmanager/.signature @@ -1,7 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF37GxrNcPPmH9xO+VCTLddXPEUcAcMF2PZgUYdg4uAOGtYlsT3+LVbh7QmCm3mA2BpB/kgphYGGc9GS0mC2iAiwM= -SHA256 (Pkgfile) = 8e40d3069a09fbc208a4a8dd31675dd4514dd9886d2443999347601c3da4f6af -SHA256 (.footprint) = 3d216dcef1bd999823f3c4b1cf0f197adc55d43c45d5e7ef8539b0a6ac5bb92b -SHA256 (NetworkManager-1.0.10.tar.xz) = 1bcfce8441dfd9f432a100d06b54f3831a2275cccc3b74b1b4c09a011e179fbc -SHA256 (networkmanager.rc) = 56aa9b070bb977a5e3abdae6e0220110374ecd880edecf6ec7e1f6de9728d993 +RWSagIOpLGJF3zRm+m0KCpM/8wtpaH03sbwwoD7X7P9GOmGw6Z671DjTBMTs8DeuQSU0qWbTIfDUm9kzVUW/iZZGsWzmPKmnPgM= +SHA256 (Pkgfile) = e836af79c7c1f3095f96b01b4e16a5f2b14054a405b9d916d8b522ad43b3582a +SHA256 (.footprint) = f545aad040b98e46a6fbd9240f699922e83dd4ecc11148553d19e85bc01621eb +SHA256 (NetworkManager-1.6.2.tar.xz) = b22b6f55cde37bec4982f9be4b1808a21101d807a05049c670116d95059a26f9 +SHA256 (networkmanager.rc) = 4a1c651328a6c4c9b7b22329a1d97139b94f62f65401f73924ac9245f9b3b77e SHA256 (NetworkManager.conf) = b854c04d516f832d93416fd4150d30bb0188e1125c431fddbc6b8a84ba53f8d1 diff --git a/networkmanager/Pkgfile b/networkmanager/Pkgfile index a1daadb..d0c48e6 100644 --- a/networkmanager/Pkgfile +++ b/networkmanager/Pkgfile @@ -2,10 +2,10 @@ # URL: http://www.gnome.org/projects/NetworkManager/ # Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve # Depends on: dbus libnl p5-xml-parser openresolv dhcpcd polkit upower libsoup iptables nss libndp -# Optional: ppp +# Optional: ppp avahi bash-completion name=networkmanager -version=1.0.10 +version=1.6.2 release=1 source=( http://ftp.gnome.org/pub/gnome/sources/NetworkManager/${version%.*}/NetworkManager-${version}.tar.xz @@ -15,20 +15,22 @@ NetworkManager.conf build() { cd NetworkManager-$version - CPPFLAGS="-I/usr/include/nspr $CPPFLAGS" \ + ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/networkmanager \ --localstatedir=/var \ + --with-udev-dir=/lib/udev \ + --with-systemdsystemunitdir=no \ --disable-nls \ --disable-static \ --enable-polkit \ - --disable-wimax \ --enable-ppp \ --enable-tests=no \ --enable-gtk-doc=no \ --enable-gtk-doc-html=no \ + --enable-introspection=no \ --with-suspend-resume=upower \ --with-dhcpcd=/sbin/dhcpcd \ --with-resolvconf=/usr/sbin/resolvconf \ @@ -42,9 +44,6 @@ build() { make make DESTDIR=$PKG install - # Remove unneeded files - rm -rf $PKG/usr/share/bash-completion $PKG/usr/share/gtk-doc - # Fix the CRUX oddity mkdir $PKG/usr/etc mv $PKG/etc/dbus-1 $PKG/usr/etc @@ -57,4 +56,9 @@ build() { # Remove rundir rm -rf $PKG/var/run $PKG/usr/share/doc $PKG/usr/share/man/man5/nmcli-examples.5 + + # Remove bash-completion config unless it's installed + if [ ! -f /usr/lib/pkgconfig/bash-completion.pc ]; then + rm -rf $PKG/usr/share/bash-completion + fi } diff --git a/networkmanager/README b/networkmanager/README index ad4b93b..62b984a 100644 --- a/networkmanager/README +++ b/networkmanager/README @@ -1,17 +1,19 @@ -To use NetworkManager for your network connections: +README for networkmanager -1. Disable any previous network scripts in rc.conf (except for loopback) -2. Add networkmanager *after* dbus -3. Create your network configuration files in: +REQUIREMENTS + +POST-INSTALL + +1. Disable any previous network scripts in /etc/rc.conf (except for loopback) + +2. Add networkmanager *after* dbus in /etc/rc.conf + +3. Optional: + Create your system-wide network configuration files in: /etc/NetworkManager/system-connections The syntax is described here: https://projects.gnome.org/NetworkManager/developers/api/09/ref-settings.htm... and here: https://developer.gnome.org/NetworkManager/unstable/ref-settings.html - The post-install script creates a sample config for each of your interfaces. -Note: To use networkmanager for wifi connections you must compile - wpa_supplicant with DBUS support. - At the time of writing, the port in opt doesn't have it. - See this feature request to find out more: - http://crux.nu/bugs/index.php?do=details&task_id=957 + Or use one of the many frontends. diff --git a/networkmanager/networkmanager.rc b/networkmanager/networkmanager.rc index 9198364..607562d 100644 --- a/networkmanager/networkmanager.rc +++ b/networkmanager/networkmanager.rc @@ -1,73 +1,34 @@ -#!/bin/bash +#!/bin/sh +PATH="/sbin:/usr/sbin:/bin:/usr/bin" -NAME=NetworkManager +NAME=networkmanager USER=root RUNDIR=/var/run/$NAME PIDFILE=$RUNDIR/$NAME.pid -STARTCMD="/usr/sbin/NetworkManager" -STOPCMD="" -STOPTIMEOUT=300 +PROG="/usr/sbin/NetworkManager" +ARGS="" -function getpid() { - if [ -z "$PIDFILE" ]; then - pid="$(pgrep -xfn "$STARTCMD")" - else - if [ -f "$PIDFILE" ]; then - pid=$(< $PIDFILE) - if [ ! -d /proc/"$pid" ]; then - echo "$NAME: removing stale pidfile $PIDFILE" >&2 - rm -f "$PIDFILE" - unset pid - fi - fi - fi - echo "$pid" -} case $1 in start) - pid=$(getpid) install -d -m 755 -o $USER $RUNDIR || exit 1 - if [ -n "$pid" ]; then - echo "$NAME already running with pid $pid" >&2 - exit 1 - fi - eval "$STARTCMD" + start-stop-daemon --start --pidfile $PIDFILE --exec $PROG -- $ARGS ;; stop) - pid=$(getpid) - if [ -n "$pid" ]; then - if [ -n "$STOPCMD" ]; then - eval "$STOPCMD" - else - kill "$pid" - fi - t=$(printf '%(%s)T' -1) - tend=$((t+STOPTIMEOUT)) - while [ -d /proc/$pid -a $t -lt $tend ]; do - sleep 0.5 - t=$(printf '%(%s)T' -1) - done - if [ -d /proc/"$pid" ]; then - echo "$NAME still running with pid $pid" >&2 - else - [ -n "$PIDFILE" ] && rm -f "$PIDFILE" - fi - else - echo "$NAME is not running" >&2 - fi + start-stop-daemon --stop --retry 60 --pidfile $PIDFILE --remove-pidfile ;; restart) $0 stop $0 start ;; status) - pid=$(getpid) - if [ -n "$pid" ]; then - echo "$NAME is running with pid $pid" - else - echo "$NAME is not running" - fi + start-stop-daemon --status --pidfile $PIDFILE + case $? in + 0) echo "$PROG running with pid: $(cat $PIDFILE)" ;; + 1) echo "$PROG not running, stale pidfile: $PIDFILE" ;; + 3) echo "$PROG not running" ;; + 4) echo "Unable to determine program status" ;; + esac ;; *) echo "usage: $0 [start|stop|restart|status]"
participants (1)
-
crux@crux.nu