add samples
This commit is contained in:
@@ -1,41 +1,27 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
#NB: Config is in /etc/conf.d/ipx
|
||||
# IPX network setup service
|
||||
#
|
||||
# Configuration is read from /etc/conf.d/ipx.
|
||||
# The actual start/stop logic is implemented in helper scripts under
|
||||
# /usr/libexec/ipx/ so that OpenRC and systemd can share the same code.
|
||||
|
||||
description="Configure IPX interfaces and automatic IPX behaviour"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
local retval=0
|
||||
|
||||
ebegin "Bringing IPX up"
|
||||
if [ ${IPX_INTERNAL_NET} = "yes" ]
|
||||
then
|
||||
/sbin/ipx_internal_net add ${IPX_NETNUM} ${IPX_NODENUM}
|
||||
retval=$?
|
||||
else
|
||||
/sbin/ipx_interface add -p ${IPX_DEVICE} \
|
||||
${IPX_FRAME} ${IPX_NETNUM}
|
||||
retval=$?
|
||||
fi
|
||||
|
||||
/sbin/ipx_configure \
|
||||
--auto_primary=${IPX_AUTO_PRIMARY} \
|
||||
--auto_interface=${IPX_AUTO_INTERFACE}
|
||||
retval=$(( $retval + $? ))
|
||||
eend ${retval} "Failed to bring IPX up"
|
||||
ebegin "Bringing IPX up"
|
||||
/usr/libexec/ipx/network-start.sh
|
||||
eend $? "Failed to bring IPX up"
|
||||
}
|
||||
|
||||
stop() {
|
||||
local retval=0
|
||||
|
||||
ebegin "Bringing IPX down"
|
||||
/sbin/ipx_configure --auto_primary=off --auto_interface=off
|
||||
retval=$?
|
||||
/sbin/ipx_interface delall
|
||||
retval=$(( $retval + $? ))
|
||||
eend ${retval} "Failed to down IPX"
|
||||
ebegin "Bringing IPX down"
|
||||
/usr/libexec/ipx/network-stop.sh
|
||||
eend $? "Failed to bring IPX down"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user