Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 185269 Details for
Bug 262765
net-misc/nstx: init scripts, qa fixes, enhancements
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
init.d script for nstxcd
nstxcd.init (text/plain), 2.29 KB, created by
Steve Brudenell
on 2009-03-17 04:37:01 UTC
(
hide
)
Description:
init.d script for nstxcd
Filename:
MIME Type:
Creator:
Steve Brudenell
Created:
2009-03-17 04:37:01 UTC
Size:
2.29 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># (Written by Phillip Berndt <phillip.berndt at gmail dot com>) ># (Modified by Steven Brudenell <steven dot brudenell at gmail>) ># $Header: $ > >depend() { > local iface > > for iface in ${NEED_INTERFACES} ; do > need net.${iface} > done > > # If the user set TUNTAP_INTERFACE, they probably have a net script > # configuring that interface. nstxcd is responsible for actually creating > # the stupid thing, so we need to run before the config. > if [ ! -z ${TUNTAP_INTERFACE} ] ; then > if [ -x /etc/init.d/net.${TUNTAP_INTERFACE} ] ; then > before net.${TUNTAP_INTERFACE} > fi > fi >} > >loadtun() { > if [ ! -e /dev/net/tun ] > then > ebegin "Loading TUN/TAP kernel module" > modprobe tun > eend $? > fi > > if [ ! -e /dev/net/tun ] > then > eend 1 "Failed to load TUN driver! (did you compile your kernel with TUN/TAP support?)" > return 1 > fi > > return 0 >} > >checkconfig() { > if [ -z "${DOMAIN}" ] ; then > eerror "DOMAIN must be set" > return 1 > fi > > [ -z "${TUNTAP_INTERFACE}" ] || NSTXCD_OPTS="${NSTXCD_OPTS} -I ${TUNTAP_INTERFACE}" > [ -z "${TUNTAP_DEVICE}" ] || NSTXCD_OPTS="${NSTXCD_OPTS} -d ${TUNTAP_DEVICE}" > > case "${MODE}" in > TUN) > NSTXCD_OPTS="${NSTXCD_OPTS} -t" > ;; > TAP) > NSTXCD_OPTS="${NSTXCD_OPTS} -T" > ;; > *) > eerror "MODE must be either TUN or TAP" > return 1 > ;; > esac > > if [ -z "${DNS_SERVER}" ] ; then > DNS_SERVER=`cat /etc/resolv.conf | grep nameserver | awk '{ print $2; }' | head -n 1` > > if [ -z "${DNS_SERVER}" ] ; then > eerror "DNS_SERVER not set, and couldn't determine a nameserver from /etc/resolv.conf" > return 1 > fi > fi > > return 0 >} > >start() { > checkconfig || return 1 > > loadtun || return 1 > > ebegin "Starting nstxcd" > > start-stop-daemon \ > --start \ > --background \ > --make-pidfile \ > --exec /usr/sbin/nstxcd \ > --pidfile "/var/run/nstxcd.pid" \ > -- ${NSTXCD_OPTS} ${DOMAIN} ${DNS_SERVER} > > eend $? >} > >stop() { > ebegin "Stopping nstxcd" > > start-stop-daemon \ > --stop \ > --exec /usr/sbin/nstxcd \ > --pidfile "/var/run/nstxcd.pid" > > eend $? >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 262765
:
185257
|
185259
|
185261
|
185262
|
185264
|
185266
|
185267
|
185268
| 185269 |
185271
|
185275