From 6b4c974d5a1a8d12831a6b0de72104368851b5a7 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Sun, 4 Mar 2012 00:34:18 +0100 Subject: Overhaul of documentation - Documentation now uses asciidoc instead of pandoc. - Documentation is updated. - More documentation is installed. - The Makefile has been revised. - Autocompletion files must now be installed through the PKGBUILD. - contrib/11netcfg has been deleted. It is unmaintained and duplicated in pm-utils. This closes FS#25587. - contrib/common.hook has been deleted. It demonstrated a feature that the target audience is already familiar with and didn't work anyway. This closes FS#27496. Developers are free to write unwieldy scripts in the {PRE,POST}_{UP,DOWN} variables. --- contrib/11netcfg | 47 --------------------------- contrib/common.hook | 91 ----------------------------------------------------- 2 files changed, 138 deletions(-) delete mode 100755 contrib/11netcfg delete mode 100755 contrib/common.hook (limited to 'contrib') diff --git a/contrib/11netcfg b/contrib/11netcfg deleted file mode 100755 index db65f5a..0000000 --- a/contrib/11netcfg +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -source /usr/lib/pm-utils/functions -source /etc/pm/config.d/netcfg - -suspend_netcfg() { - case $NETCFG_SUSPEND in - daemons) - stopservice net-profiles - stopservice net-auto-wired - stopservice net-auto-wireless - ;; - retain|*) - netcfg all-suspend - ;; - esac -} - -resume_netcfg() { - case $NETCFG_SUSPEND in - daemons) - restartservice net-profiles - restartservice net-auto-wired - restartservice net-auto-wireless - ;; - retain|*) - netcfg all-resume - ;; - esac -} - -if [ -x /usr/bin/netcfg2 ]; then - case "$1" in - hibernate|suspend) - suspend_netcfg - ;; - thaw|resume) - resume_netcfg - ;; - *) - ;; - esac -fi - -exit $? - -# vim: ft=sh ts=4 et sw=4: diff --git a/contrib/common.hook b/contrib/common.hook deleted file mode 100755 index 9018888..0000000 --- a/contrib/common.hook +++ /dev/null @@ -1,91 +0,0 @@ -### Sample netcfg hook script showing how to declare shared settings -# -### These functions and variables will be available to all profiles -### (They can be manually overridden by any profile.) -### To install, make this executable and put it in /etc/network.d/hooks - -function RUNDAEMON { - # "RUNDAEMON [options] daemon { start | stop }" will run the daemon - # -d DEP: will only run if daemon DEP is registered as also started/stopped in /var/run/daemons - # will only stop if daemon is running (or option -f) - # will only start if daemon is in the DAEMONS array (or option -f) - local force dep - while true; do - if [[ "$1" = "-f" ]]; then - force=1 - shift - elif [[ "$1" = "-d" ]]; then - [[ -e "/run/daemons/$2" ]] - if [ $? -eq 0 ]; then - case "$dep" in - yes) ;; - no) dep=mixed;; - *) dep=yes;; - esac - else - case "$dep" in - no) ;; - yes) dep=mixed;; - *) dep=no;; - esac - fi - shift 2 - else - break - fi - done - local daemon="$1" - shift - if [[ ! -x "/etc/rc.d/$daemon" ]]; then - echo "/etc/rc.d/$daemon isn't executable." >&2 - return 1 - fi - case "$1" in - start) - if [[ "$dep" = no || "$dep" = mixed ]]; then - force=0 - elif [[ "$force" -ne 1 ]]; then - for f in "${DAEMONS[@]}"; do - if [[ "$f" = "$daemon" || "$f" = "@$daemon" ]]; then - force=1 - break - fi - done - fi - ;; - stop) - if [[ "$dep" = yes || "$dep" = mixed ]]; then - force=0 - elif [[ "$force" -ne 1 ]]; then - [[ ! -e "/var/run/$daemon" ]] - force=$? - fi - ;; - *) - force=1 - ;; - esac - if [[ "$force" -eq 1 ]]; then - "/etc/rc.d/$daemon" "$@" - local result=$? - stat_busy "Resuming netcfg $PROFILE..." # else we'll get a [DONE] or [FAIL] at the end of a third blank line, after messages from $daemon - return $result - fi - return 0 # $daemon doesn't satisfy conditions, fail quietly - # returning 1 would make our POST_UP script, and hence our connection attempt, fail -} - -# Example of some things you might do in your POST_UP/PRE_DOWN scripts -# (In fact, I couldn't get awesome-client to work on its own in this context, I had to call a wrapper instead that -# sources the file in ~/.dbus/session-bus and then exports DBUS_SESSION_BUS_ADDRESS, and then calls awesome-client.) -# -PRE_DOWN='RUNDAEMON -f netfs stop' -POST_DOWN='( sleep 3 && echo "mynetworkfun()" | sudo -Hu me /usr/bin/awesome-client 2>/dev/null) &' - -POST_UP='( sleep 3 && echo "mynetworkfun()" | sudo -Hu me /usr/bin/awesome-client 2>/dev/null) & RUNDAEMON -f -d nfs-common netfs start' - -# Quirks and other variables defined here will apply to all your profiles... -QUIRKS=() -WPA_GROUP="network" - -# vim: ft=sh ts=4 et sw=4: -- cgit v1.2.3-24-g4f1b