blob: b724ce151ddfd251a904f32cb63c286d951c4d53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
# Begin $rc_base/init.d/portmap
#$LastChangedBy: bdubbs $
#$Date: 2007/09/26 14:05:19 $
#$Id: portmap,v 1.2 2007/09/26 14:05:19 install Exp $
. /etc/sysconfig/rc
. $rc_functions
newuser=bin
newid=1
getent passwd $newuser >/dev/null|| /usr/sbin/useradd -g $newid \
-u $newid -d /dev/null -s /bin/false $newuser
case "$1" in
start)
boot_mesg "Starting RPC Portmap"
loadproc /sbin/portmap
;;
stop)
boot_mesg "Stopping Portmap"
killproc /sbin/portmap
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /sbin/portmap
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/portmap
|