1 |
sbriesen 08/09/02 18:02:28 |
2 |
|
3 |
Added: ser2net.confd ser2net.initd |
4 |
Log: |
5 |
version bump, adding init-script + config. Solves bug #160268. |
6 |
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-misc/ser2net/files/ser2net.confd |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/ser2net/files/ser2net.confd?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/ser2net/files/ser2net.confd?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: ser2net.confd |
15 |
=================================================================== |
16 |
# Config file for /etc/init.d/ser2net |
17 |
|
18 |
# Set the configuration file to one other than the default of /etc/ser2net.conf |
19 |
# |
20 |
#CONFIG_FILE="/etc/ser2net.conf" |
21 |
|
22 |
# Enables the control port and sets the TCP port to listen to for the control port. |
23 |
# A port number may be of the form [host,]port, such as 127.0.0.1,2000 or localhost,2000. |
24 |
# If this is specified, it will only bind to the IP address specified for the port. |
25 |
# Otherwise, it will bind to all the addresses on the machine. |
26 |
# |
27 |
#CONTROL_PORT="" |
28 |
|
29 |
# Cisco IOS uses a different mechanism for specifying the baud rates than the mechanism |
30 |
# described in RFC2217. This option sets the IOS version of setting the baud rates. |
31 |
# The default is RFC2217s. |
32 |
# |
33 |
#CISCO_IOS="yes" |
34 |
|
35 |
# Enable or disable UUCP locking (default=yes) |
36 |
# |
37 |
#UUCP_LOCKS="no" |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 net-misc/ser2net/files/ser2net.initd |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/ser2net/files/ser2net.initd?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/ser2net/files/ser2net.initd?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: ser2net.initd |
48 |
=================================================================== |
49 |
#!/sbin/runscript |
50 |
# Copyright 1999-2008 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/ser2net/files/ser2net.initd,v 1.1 2008/09/02 18:02:28 sbriesen Exp $ |
53 |
|
54 |
depend() { |
55 |
need net |
56 |
after bootmisc |
57 |
} |
58 |
|
59 |
config_check() { |
60 |
SER2NET_OPTS="" |
61 |
CONFIG_FILE_DEFAULT="/etc/ser2net.conf" |
62 |
|
63 |
yesno "${CISCO_IOS:-no}" && SER2NET_OPTS="${SER2NET_OPTS} -b" |
64 |
yesno "${UUCP_LOCKS:-yes}" || SER2NET_OPTS="${SER2NET_OPTS} -u" |
65 |
[ -z "${CONFIG_FILE}" ] && CONFIG_FILE="${CONFIG_FILE_DEFAULT}" |
66 |
[ -n "${CONTROL_PORT}" ] && SER2NET_OPTS="${SER2NET_OPTS} -p ${CONTROL_PORT}" |
67 |
[ "${CONFIG_FILE}" != "${CONFIG_FILE_DEFAULT}" ] && SER2NET_OPTS="${SER2NET_OPTS} -c ${CONFIG_FILE}" |
68 |
|
69 |
if [ ! -f "${CONFIG_FILE}" ]; then |
70 |
eerror "Please create ${CONFIG_FILE}" |
71 |
eerror "Sample conf: ${CONFIG_FILE_DEFAULT}.dist" |
72 |
return 1 |
73 |
fi |
74 |
return 0 |
75 |
} |
76 |
|
77 |
start() { |
78 |
config_check || return ${?} |
79 |
ebegin "Starting Serial to network proxy (${SVCNAME})" |
80 |
start-stop-daemon --start --quiet --pidfile /var/run/${SVCNAME}.pid \ |
81 |
--exec /usr/sbin/ser2net -- ${SER2NET_OPTS} -P /var/run/${SVCNAME}.pid |
82 |
eend ${?} |
83 |
} |
84 |
|
85 |
stop() { |
86 |
ebegin "Stopping Serial to network proxy (${SVCNAME})" |
87 |
start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid |
88 |
eend ${?} |
89 |
} |