[Initscripts-ng-commits] r880 - in /trunk/src/insserv/debian: bash-completion changelog dirs insserv.dirs rules

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Sun Apr 12 17:01:42 UTC 2009


Author: kelmo-guest
Date: Sun Apr 12 17:01:42 2009
New Revision: 880

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=880
Log:
* Consolidate debian/insserv.dirs into debian/dirs, only one should
  exist.
* Add debian/bash-completion and install it to /etc/bash_completion.d/
  to enhance usability for bash shell users.

Added:
    trunk/src/insserv/debian/bash-completion
Removed:
    trunk/src/insserv/debian/insserv.dirs
Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/dirs
    trunk/src/insserv/debian/rules

Added: trunk/src/insserv/debian/bash-completion
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/bash-completion?rev=880&op=file
==============================================================================
--- trunk/src/insserv/debian/bash-completion (added)
+++ trunk/src/insserv/debian/bash-completion Sun Apr 12 17:01:42 2009
@@ -1,0 +1,36 @@
+# insserv(8) completion
+#
+# Copyright (c) 2009 Kel Modderman <kel at otaku42.de>
+#
+
+have insserv &&
+_insserv()
+{
+    local cur prev sysvdir services options
+
+    cur=`_get_cword`
+    prev=${COMP_WORDS[COMP_CWORD-1]}
+
+    [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
+	|| sysvdir=/etc/init.d
+
+    services=( $(echo $sysvdir/!(README*|*.dpkg*|*.rpm@(orig|new|save))) )
+    services=( ${services[@]#$sysvdir/} )
+    options=( -c --config -d -f -n -o --override -p --path -r -v )
+
+    case "$prev" in
+	-c|--config)
+	    _filedir
+	    ;;
+	-o|--override|-p|--path)
+	    _filedir -d
+	    ;;
+	*)
+	    COMPREPLY=( $( compgen -W '${options[@]} ${services[@]}' -- \
+		$cur ) )
+	    ;;
+    esac
+
+    return 0
+} &&
+complete -F _insserv insserv

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=880&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Sun Apr 12 17:01:42 2009
@@ -22,8 +22,12 @@
   * Add interface to disable|enable service symlinks for all Default-
     Start runlevels or those specified on the command line. This is
     analogous to the interface introduced to update-rc.d of 2.86.ds1-62.
-
- -- Kel Modderman <kel at otaku42.de>  Tue, 17 Mar 2009 07:36:37 +1000
+  * Consolidate debian/insserv.dirs into debian/dirs, only one should
+    exist.
+  * Add debian/bash-completion and install it to /etc/bash_completion.d/
+    to enhance usability for bash shell users.
+
+ -- Kel Modderman <kel at otaku42.de>  Mon, 13 Apr 2009 02:58:51 +1000
 
 insserv (1.12.0-4) unstable; urgency=low
 

Modified: trunk/src/insserv/debian/dirs
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/dirs?rev=880&op=diff
==============================================================================
--- trunk/src/insserv/debian/dirs (original)
+++ trunk/src/insserv/debian/dirs Sun Apr 12 17:01:42 2009
@@ -1,5 +1,6 @@
+etc/bash_completion.d
 etc/insserv.conf.d
 etc/insserv/overrides
 usr/sbin
-usr/share/insserv/examples
 usr/share/insserv/overrides
+var/lib/insserv

Modified: trunk/src/insserv/debian/rules
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/rules?rev=880&op=diff
==============================================================================
--- trunk/src/insserv/debian/rules (original)
+++ trunk/src/insserv/debian/rules Sun Apr 12 17:01:42 2009
@@ -69,6 +69,8 @@
 	$(INSTALL) debian/update-bootsystem-insserv $(DESTDIR)$(sbindir)/.
 	$(INSTALL) debian/update-rc.d-insserv $(DESTDIR)$(sbindir)/.
 
+	# Install bash(1) completion
+	$(INSTALL_DATA) debian/bash-completion $(DESTDIR)/etc/bash_completion.d/insserv
 
 # Build architecture-independent files here.
 binary-indep: build install




More information about the Initscripts-ng-commits mailing list