debian/0000755000000000000000000000000011426105711007164 5ustar debian/ifscheme.docs0000644000000000000000000000001011313003242011577 0ustar README* debian/ifscheme.install0000644000000000000000000000022011313003242012320 0ustar ifscheme sbin/ ifscheme-mapping sbin/ essidscan sbin/ wifichoice.sh sbin/ ifscheme.8 usr/share/man/man8/ debian/essidscan.8 usr/share/man/man8/ debian/source/0000755000000000000000000000000011313003271010455 5ustar debian/source/format0000644000000000000000000000001411313003271011663 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000001032411426105711011036 0ustar ifscheme (1.7-3ubuntu1) maverick; urgency=low * Merge from debian unstable. Remaining changes: LP: #592533 o Split out changes due to new quilt format: - ifscheme-correct-state.diff: + Corrected new ifstate and scheme location - ifscheme-mapping.diff + Change /etc/network/run/scheme > /etc/network/scheme in ifscheme-mapping also closes LP: #160585, LP: #376641 (Forwarded as DBTS: #589193) -- Bhavani Shankar Sun, 25 Jul 2010 19:39:42 +0530 ifscheme (1.7-3) unstable; urgency=low * Adopt 3.0 (quilt) format. * Bump Standards-Version. * Create /var/lib/ifscheme if it doesn't exist, and * Make sure the init script is also called when rebooting. Closes: #429481 * Mention to use the full pathname to the ifscheme-mapping script in /etc/network/interfaces. Closes: #542219 * Use dh_prep instead of dh_clean -k. -- Guus Sliepen Sat, 19 Dec 2009 00:03:52 +0100 ifscheme (1.7-2.1ubuntu1) karmic; urgency=low * Merge from debian unstable, remaining changes: LP: #399136 - Corrected new ifstate and scheme location * Change /etc/network/run/scheme > /etc/network/scheme in ifscheme-mapping also closes LP: #160585, LP: #376641(Hopefully) -- Bhavani Shankar Tue, 14 Jul 2009 11:52:24 +0530 ifscheme (1.7-2.1) unstable; urgency=low * Non-maintainer upload. * Fix bashism. Closes: #530978 * Add watch file. -- Raphael Geissert Tue, 07 Jul 2009 13:24:11 -0500 ifscheme (1.7-2ubuntu1) gutsy; urgency=low * Merge from Debian unstable. Remaining Ubuntu changes: - Corrected new ifstate and scheme location * Maintainer set to MOTU developers -- Andrea Veri Tue, 12 Jun 2007 11:31:44 +0200 ifscheme (1.7-2) unstable; urgency=low * Run init script at shutdown as well. Closes: #334585 -- Guus Sliepen Mon, 11 Jun 2007 22:31:58 +0200 ifscheme (1.7-1ubuntu1) gutsy; urgency=low * Corrected new ifstate and scheme location (LP: 56636) * Changed maintainer field -- Stijn Polfliet Thu, 31 May 2007 17:21:54 +0200 ifscheme (1.7-1) unstable; urgency=low * New upstream release. * Fix spelling mistake in package description. Closes: #363954 * Apply patch from Stefan Ott that adds bash completion. Closes: #387294 * debhelper is a Build-Depends, not a Build-Depends-Indep. * Add LSB section to the init file. -- Guus Sliepen Sat, 9 Dec 2006 16:03:01 +0100 ifscheme (1.5-3) unstable; urgency=low * Run ifscheme init script after mounting local filesystems. Closes: #334585 -- Guus Sliepen Fri, 2 Dec 2005 14:50:23 +0100 ifscheme (1.5-2) unstable; urgency=low * Configurable boot-time behaviour, see /etc/default/ifscheme. Closes: #334585 -- Guus Sliepen Wed, 30 Nov 2005 12:47:34 +0100 ifscheme (1.5-1) unstable; urgency=low * New upstream release. Closes: #274470 * Include init script that will set scheme to $SCHEME at boot time. Closes: #245785, #307609 -- Guus Sliepen Sat, 1 Oct 2005 17:58:10 +0200 ifscheme (1.4-1) unstable; urgency=medium * New upstream release. -- Guus Sliepen Wed, 18 May 2005 11:52:02 +0200 ifscheme (1.3-3) unstable; urgency=medium * Stupid mistake caused by applying a patch by hand. Closes: #304418 -- Guus Sliepen Sat, 16 Apr 2005 17:07:20 +0200 ifscheme (1.3-2) unstable; urgency=low * Location of ifstate has moved to /etc/network/run/. Thanks to Sven Koch for noticing. Closes: #304418 -- Guus Sliepen Wed, 13 Apr 2005 11:40:35 +0200 ifscheme (1.3-1) unstable; urgency=low * New upstream release. Closes: #256454 -- Guus Sliepen Fri, 2 Jul 2004 16:25:24 +0200 ifscheme (1.2-1) unstable; urgency=low * New upstream release. Closes: #243121 -- Guus Sliepen Thu, 15 Apr 2004 15:37:37 +0200 ifscheme (1.1-1) unstable; urgency=low * New upstream release. -- Guus Sliepen Tue, 30 Mar 2004 21:14:33 +0200 ifscheme (1.0-1) unstable; urgency=low * Initial Release. -- Guus Sliepen Mon, 15 Mar 2004 12:36:37 +0100 debian/control0000644000000000000000000000135511426105711010573 0ustar Source: ifscheme Section: net Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Guus Sliepen Build-Depends: debhelper (>= 7.0.0) Standards-Version: 3.8.3 Package: ifscheme Architecture: all Depends: ifupdown (>= 0.6.5), ${shlibs:Depends}, ${misc:Depends} Description: scheme control for network interfaces ifscheme allows you to change network configuration schemes or query the current scheme. It integrates with the ifup(8) command and interfaces(5). For example, you might use this program to configure a "home" scheme and a "work" scheme for a network device on a laptop. When you move between home and work, a simple command can reconfigure your networking. debian/essidscan.80000644000000000000000000000237411313003242011226 0ustar .TH ESSIDSCAN 8 "" "" "Commands" .SH NAME essidscan \- scan for ESSID corresponding to available WLAN access points .SH SYNOPSIS In .I /etc/network/interfaces: .P .B mapping script essidscan .SH DESCRIPTION .P The essidscan utility is used to tell the ifup and ifdown utilities about the current SSID of the WLAN currently being accessed. It can be used to map the SSID name to an iface stanza. .SH CONFIGURATION A sample .I /etc/network/interfaces may look like this: .P mapping hotplug script /etc/network/essidscan map SSIDONE wlan-work map SSIDTWO wlan-work map HOME iface wlan-work inet dhcp wireless-key 1234-5678-9ABC-DEF0-1234-5678-9A wireless-keymode restricted iface HOME inet static address 192.168.2.4 netmask 255.255.255.0 gateway 192.168.2.1 wireless-essid HOME wireless-key s:somepassword wireless-keymode open iface DEFAULT inet dhcp .SH FILES .TP .I /etc/network/interfaces the interfaces definition file .TP .I /etc/network/run/ifstate a record of the current state of the interfaces, managed by ifup and ifdown .SH "SEE ALSO" .BR interfaces (5) .BR ifscheme (8) .BR ifup (8) .BR ifdown (8) .SH AUTHORS Tor Slettnes debian/ifscheme.preinst0000644000000000000000000000021211313003242012337 0ustar #!/bin/sh -e if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt "1.5-3" ; then update-rc.d -f ifscheme remove fi ##DEBHELPER## debian/bash_completion0000644000000000000000000000035511313003242012247 0ustar _ifscheme() { cur=${COMP_WORDS[COMP_CWORD]} schemes=$( cat /etc/network/interfaces | grep "iface.*-.*inet" | cut -d ' ' -f 2 | cut -d '-' -f 2 | sort ) COMPREPLY=( $( compgen -W "$schemes" -- $cur ) ) } complete -F _ifscheme ifscheme debian/copyright0000644000000000000000000000054011313003242011105 0ustar This package was debianized by Guus Sliepen on Mon, 15 Mar 2004 12:36:37 +0100. It was downloaded from http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html Upstream Author: Jean Tourrilhes Copyright: Redistribution is subject to the GNU public license. For more info see /usr/share/common-licenses/GPL. debian/rules0000755000000000000000000000416111313006136010242 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. #$(MAKE) #/usr/bin/docbook-to-man debian/ifscheme.sgml > ifscheme.1 touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp debian/ifscheme.init # Add here commands to clean up after the build process. #-$(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/ifscheme. #$(MAKE) install DESTDIR=$(CURDIR)/debian/ifscheme dh_install ln -s ifscheme.8 debian/ifscheme/usr/share/man/man8/ifscheme-mapping.8 ln -s ../ifscheme.init debian/ mkdir -p debian/ifscheme/etc/default debian/ifscheme/etc/bash_completion.d cp ifscheme.default debian/ifscheme/etc/default/ifscheme cp debian/bash_completion debian/ifscheme/etc/bash_completion.d/ifscheme # Build architecture-dependent files here. binary-arch: build install # We have nothing to do by default. # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs CHANGELOG dh_installdocs dh_installexamples # dh_install # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime dh_installinit --no-start -- start 40 S . stop 40 0 6 . # dh_installcron # dh_installinfo dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_perl # dh_python # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure debian/watch0000644000000000000000000000015211313003242010202 0ustar version=3 http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html \ ifscheme[.-](.+)\.tar\.gz debian/patches/0000755000000000000000000000000011426105711010613 5ustar debian/patches/series0000644000000000000000000000030111426105711012022 0ustar create-var-lib-ifscheme.diff readme-use-full-pathname.diff ifscheme-remove-bashism.diff init-script-lsb-header.diff manpage-escape-dashes.diff ifscheme-mapping.diff ifscheme-correct-state.diff debian/patches/ifscheme-correct-state.diff0000644000000000000000000000074311426105711016011 0ustar Author: Stijn Polfliet Bug-Ubuntu: https://bugs.launchpad.net/bugs/56636 Description: Fix to correct state and scheme location in ifscheme --- ifscheme-1.7.orig/ifscheme +++ ifscheme-1.7/ifscheme @@ -3,9 +3,9 @@ # File locations OLD_IFSTATE=/etc/network/ifstate -NEW_IFSTATE=/etc/network/run/ifstate +NEW_IFSTATE=/var/run/network/ifstate INTERFACES=/etc/network/interfaces -SCHEME=/etc/network/run/scheme +SCHEME=/etc/network/scheme usage () { debian/patches/init-script-lsb-header.diff0000644000000000000000000000063111313006514015712 0ustar --- a/ifscheme.init +++ b/ifscheme.init @@ -1,4 +1,15 @@ #!/bin/sh +# +### BEGIN INIT INFO +# Provides: ifscheme +# Required-Start: ifupdown +# Required-Stop: ifupdown +# Should-Start: +# Should-Stop: +# Default-Start: S +# Default-Stop: 0 6 +# Short-Description: Select default network scheme +### END INIT INFO NAME=ifscheme SCHEMEVOLATILE=/etc/network/run/scheme debian/patches/ifscheme-mapping.diff0000644000000000000000000000115111426105711014657 0ustar Author: Bhavani Shankar Bug-Ubuntu: https://bugs.launchpad.net/bugs/160585 Bug-Ubuntu: https://bugs.launchpad.net/bugs/376641 Bug-Debian: http://bugs.debian.org/589193 Description: Fix for inactive ifscheme mapping scheme. --- ifscheme-1.7.orig/ifscheme-mapping +++ ifscheme-1.7/ifscheme-mapping @@ -5,7 +5,7 @@ # Arguments : on the command line, we have the name of the interface. # If the mapping contains some "map" statements, we get them from stdin. -SCHEME=/etc/network/run/scheme +SCHEME=/etc/network/scheme # Take care of users calling this program directly. if [ -z "$1" ] ; then debian/patches/readme-use-full-pathname.diff0000644000000000000000000000066711313006027016233 0ustar --- a/README.ifscheme +++ b/README.ifscheme @@ -20,7 +20,7 @@ auto wlan0 mapping wlan0 - script /usr/local/bin/ifscheme-mapping + script /sbin/ifscheme-mapping iface wlan0-home inet static address 192.168.1.5 @@ -61,7 +61,7 @@ ------------ mapping eth0 - script ifscheme-mapping + script /sbin/ifscheme-mapping map eth0-local eth0-local map eth0-masq masquerading map eth0-* anywhere debian/patches/ifscheme-remove-bashism.diff0000644000000000000000000000105011313004143016133 0ustar From: Raphael Geissert --- ifscheme-1.7.orig/ifscheme +++ ifscheme-1.7/ifscheme @@ -107,7 +107,7 @@ # Second, extract from the state file any real interface # which liface either match the mapping above or is # appened by the old scheme name. - active_ifaces=$(grep -F -- "-$oldscheme"$'\n'"$old_mappings" $IFSTATE | cut -d = -f 1) + active_ifaces=$(grep -F -- "$(printf -- "-%s\n%s" "$oldscheme" "$old_mappings")" $IFSTATE | cut -d = -f 1) # Now, restart all those interfaces for iface in $active_ifaces ; do debian/patches/manpage-escape-dashes.diff0000644000000000000000000000120311313006554015554 0ustar --- a/ifscheme.8 +++ b/ifscheme.8 @@ -41,8 +41,8 @@ .B --scheme newscheme Change to a new network configuration scheme. When the scheme is changed, network interfaces that were using the old scheme -will be taken down and brought back up to use the new configuration scheme. -s -or --scheme are mandatory if newscheme begins with a -. +will be taken down and brought back up to use the new configuration scheme. \-s +or \-\-scheme are mandatory if newscheme begins with a \-. .SH CONFIGURATION To make the program do anything useful when a scheme is selected, you must edit /etc/network/interfaces to add a mapping for the interface (or debian/patches/create-var-lib-ifscheme.diff0000644000000000000000000000034011313005105016007 0ustar --- a/ifscheme.init +++ b/ifscheme.init @@ -21,6 +21,7 @@ do_stop() { if [ -r $SCHEMEVOLATILE ]; then + mkdir -p `dirname $SCHEMEPERSISTENT` cat $SCHEMEVOLATILE > $SCHEMEPERSISTENT else rm -f $SCHEMEPERSISTENT debian/compat0000644000000000000000000000000211313004343010354 0ustar 7