summaryrefslogtreecommitdiff
blob: 983d4b0746e6a421593e590df4982bec189d7bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/quickswitch/files/net.eth0-switchto.rc6,v 1.5 2004/07/14 21:18:17 agriffis 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() {
	true
}