diff options
author | <jerrya@gentoo.org> | 2001-12-07 19:25:53 +0000 |
---|---|---|
committer | <jerrya@gentoo.org> | 2001-12-07 19:25:53 +0000 |
commit | 0d4ce15d782dd53cfb83b925e3d0aa615e5c01e1 (patch) | |
tree | 27f77e2facc98b35d8984f9356aa0fabc144b014 /app-admin | |
parent | digests and a new glibc to fix a pt_chown problem (diff) | |
download | historical-0d4ce15d782dd53cfb83b925e3d0aa615e5c01e1.tar.gz historical-0d4ce15d782dd53cfb83b925e3d0aa615e5c01e1.tar.bz2 historical-0d4ce15d782dd53cfb83b925e3d0aa615e5c01e1.zip |
Forgot the init.d file on previous commit.
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/quickswitch/files/net.eth0-switchto.rc6 | 23 | ||||
-rw-r--r-- | app-admin/quickswitch/quickswitch-0.10.ebuild | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/app-admin/quickswitch/files/net.eth0-switchto.rc6 b/app-admin/quickswitch/files/net.eth0-switchto.rc6 new file mode 100644 index 000000000000..35f58e945221 --- /dev/null +++ b/app-admin/quickswitch/files/net.eth0-switchto.rc6 @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/app-admin/quickswitch/files/net.eth0-switchto.rc6,v 1.1 2001/12/07 19:25:53 jerrya Exp $ + +checkconfig() { + if [ ! -e /etc/quickswitch/switch.conf ]; then + eerror "You need a /etc/quickswitch/switch.conf file to run quickswitch" + eerror "A sample file is located in /etc/quickswitch/switch.conf.sample" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Switching network config" + /usr/bin/switchto -s > /dev/null 2>&1 + end $? +} + +end() { + echo > /dev/null 2>&1 +} diff --git a/app-admin/quickswitch/quickswitch-0.10.ebuild b/app-admin/quickswitch/quickswitch-0.10.ebuild index 84173423bef8..291c1ddca103 100644 --- a/app-admin/quickswitch/quickswitch-0.10.ebuild +++ b/app-admin/quickswitch/quickswitch-0.10.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2001 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Maintainer: Jerry A! <jerry@thehutt.org> -# $Header: /var/cvsroot/gentoo-x86/app-admin/quickswitch/quickswitch-0.10.ebuild,v 1.1 2001/12/07 18:00:05 jerrya Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/quickswitch/quickswitch-0.10.ebuild,v 1.2 2001/12/07 19:25:53 jerrya Exp $ S=${WORKDIR}/${PN} DESCRIPTION="Utility to switch network profiles on the fly" @@ -18,7 +18,7 @@ src_install () { dosed "s:/etc/switchto.last:/etc/quickswitch/switchto.last:" /usr/bin/switchto exeinto /etc/init.d - newexe ${FILESDIR}/net-switchto.rc6 net-switchto + newexe ${FILESDIR}/net.eth0-switchto.rc6 net.eth0-switchto dodir /etc/quickswitch insinto /etc/quickswitch |