View | Details | Raw Unified | Return to bug 36571
Collapse All | Expand All

(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/conffiles/etc/init.d/portmap (-77 lines)
 Lines 1-77    Link Here 
1
#!/bin/sh
2
@%@UCRWARNING=# @%@
3
4
# start/stop portmap daemon.
5
6
### BEGIN INIT INFO
7
# Provides:          portmap
8
# Required-Start:    $network
9
# Required-Stop:     $network
10
# Should-Start:      $named
11
# Should-Stop:       $named
12
# Default-Start:     S 2 3 4 5
13
# Default-Stop:      0 1 6
14
### END INIT INFO
15
16
test -f /sbin/portmap || exit 0
17
18
. /lib/lsb/init-functions
19
20
OPTIONS=""
21
if [ -f /etc/default/portmap ]; then
22
  . /etc/default/portmap
23
elif [ -f /etc/portmap.conf ]; then
24
  . /etc/portmap.conf
25
fi
26
27
case "$1" in
28
    start)
29
        # check ucr autostart setting
30
        if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ]; then
31
            . "/usr/share/univention-config-registry/init-autostart.lib"
32
            check_autostart portmap portmap/autostart
33
        fi
34
	log_begin_msg "Starting portmap daemon..."
35
	pid=`pidof portmap`
36
	if [ -n "$pid" ] ; then
37
	      log_begin_msg "Already running."
38
	      log_end_msg 0
39
	      exit 0
40
	fi
41
	start-stop-daemon --start --quiet --oknodo --exec /sbin/portmap -- $OPTIONS
42
	log_end_msg $?
43
44
	sleep 1 # needs a short pause or pmap_set won't work. :(
45
	if [ -f /var/run/portmap.upgrade-state ]; then
46
	  log_begin_msg "Restoring old RPC service information..."
47
	  pmap_set </var/run/portmap.upgrade-state
48
	  log_end_msg $?
49
	  rm -f /var/run/portmap.upgrade-state
50
	else
51
	  if [ -f /var/run/portmap.state ]; then
52
	    pmap_set </var/run/portmap.state
53
	    rm -f /var/run/portmap.state
54
	  fi
55
	fi
56
57
	;;
58
    stop)
59
	log_begin_msg "Stopping portmap daemon..."
60
	pmap_dump >/var/run/portmap.state
61
	start-stop-daemon --stop --quiet --oknodo --exec /sbin/portmap
62
	log_end_msg $?
63
	;;
64
    force-reload)
65
	$0 restart
66
	;;
67
    restart)
68
	$0 stop
69
	$0 start
70
	;;
71
    *)
72
	log_success_msg "Usage: /etc/init.d/portmap {start|stop|force-reload|restart}"
73
	exit 1
74
	;;
75
esac
76
77
exit 0
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/conffiles/etc/init.d/rpcbind (+105 lines)
Line 0    Link Here 
1
#!/bin/sh
2
@%@UCRWARNING=# @%@
3
#
4
# start/stop rpcbind daemon.
5
6
### BEGIN INIT INFO
7
# Provides:          rpcbind
8
# Required-Start:    $network $local_fs
9
# Required-Stop:     $network $local_fs
10
# Default-Start:     S 2 3 4 5
11
# Default-Stop:      0 1 6
12
# Short-Description: RPC portmapper replacement
13
# Description:       rpcbind is a server that converts RPC (Remote
14
#                    Procedure Call) program numbers into DARPA
15
#                    protocol port numbers. It must be running in
16
#                    order to make RPC calls. Services that use
17
#                    RPC include NFS and NIS.
18
### END INIT INFO
19
20
test -f /sbin/rpcbind || exit 0
21
22
. /lib/lsb/init-functions
23
24
OPTIONS="-w"
25
STATEDIR=/run/rpcbind
26
PIDFILE=/run/rpcbind.pid
27
28
if [ -f /etc/default/rpcbind ]
29
then
30
    . /etc/default/rpcbind
31
elif [ -f /etc/rpcbind.conf ]
32
then
33
    . /etc/rpcbind.conf
34
fi
35
36
start ()
37
{
38
    # check ucr autostart setting
39
    if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ]; then
40
        . "/usr/share/univention-config-registry/init-autostart.lib"
41
        check_autostart rpcbind rpcbind/autostart
42
    fi
43
    if [ ! -d $STATEDIR ] ; then
44
        mkdir $STATEDIR
45
    fi
46
    if [ ! -O $STATEDIR ] ; then
47
        log_begin_msg "$STATEDIR not owned by root"
48
        log_end_msg 1
49
        exit 1
50
    fi
51
    if [ ! -f $STATEDIR/rpcbind.xdr ]
52
    then
53
        touch $STATEDIR/rpcbind.xdr
54
    fi
55
    if [ ! -f $STATEDIR/portmap.xdr ]
56
    then
57
        touch $STATEDIR/portmap.xdr
58
    fi
59
    [ -x /sbin/restorecon ] && /sbin/restorecon $STATEDIR/*.xdr
60
    log_begin_msg "Starting rpcbind daemon..."
61
    pid=$( pidofproc /sbin/rpcbind )
62
    if [ -n "$pid" ]
63
    then
64
        log_begin_msg "Already running."
65
        log_end_msg 0
66
        exit 0
67
    fi
68
    start-stop-daemon --start --quiet --oknodo --exec /sbin/rpcbind -- "$@"
69
    pid=$( pidofproc /sbin/rpcbind )
70
    echo -n "$pid" >"$PIDFILE"
71
    # /run/sendsigs.omit.d is created by /etc/init.d/mountkernfs.sh
72
    ln -sf "$PIDFILE" /run/sendsigs.omit.d/rpcbind
73
    log_end_msg $?
74
75
}
76
77
stop ()
78
{
79
    log_begin_msg "Stopping rpcbind daemon..."
80
    start-stop-daemon --stop --quiet --oknodo --exec /sbin/rpcbind
81
    rm -f "$PIDFILE"
82
    log_end_msg $?
83
}
84
85
case "$1" in
86
    start)
87
        start $OPTIONS
88
        ;;
89
    stop)
90
        stop
91
        ;;
92
    restart|force-reload)
93
        stop
94
        start $OPTIONS
95
        ;;
96
    status)
97
        status_of_proc /sbin/rpcbind rpcbind && exit 0 || exit $?
98
        ;;
99
    *)
100
        log_success_msg "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
101
        exit 1
102
        ;;
103
esac
104
105
exit 0
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/debian/changelog (+6 lines)
 Lines 1-3    Link Here 
1
univention-base-files (4.0.6-3) unstable; urgency=low
2
3
  * Bug #36571: Replace service "portmap" by "rpcbind"
4
5
 -- Philipp Hahn <hahn@univention.de>  Wed, 28 Jan 2015 09:14:52 +0100
6
1
univention-base-files (4.0.6-2) unstable; urgency=medium
7
univention-base-files (4.0.6-2) unstable; urgency=medium
2
8
3
  * Bug #13811: register mysql/autostart UCR variable
9
  * Bug #13811: register mysql/autostart UCR variable
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/debian/ucslint.overrides (-2 / +2 lines)
 Lines 15-21    Link Here 
15
0004-56: conffiles/etc/init.d/nscd
15
0004-56: conffiles/etc/init.d/nscd
16
0004-56: conffiles/etc/init.d/ntp
16
0004-56: conffiles/etc/init.d/ntp
17
0004-56: conffiles/etc/init.d/openbsd-inetd
17
0004-56: conffiles/etc/init.d/openbsd-inetd
18
0004-56: conffiles/etc/init.d/portmap
18
0004-56: conffiles/etc/init.d/rpcbind
19
0004-56: conffiles/etc/init.d/rdate
19
0004-56: conffiles/etc/init.d/rdate
20
0004-56: conffiles/etc/inputrc
20
0004-56: conffiles/etc/inputrc
21
0004-56: conffiles/etc/networks
21
0004-56: conffiles/etc/networks
 Lines 36-42    Link Here 
36
0010-2: conffiles/etc/init.d/ntp
36
0010-2: conffiles/etc/init.d/ntp
37
0010-2: conffiles/etc/init.d/rdate
37
0010-2: conffiles/etc/init.d/rdate
38
0010-2: conffiles/etc/init.d/openbsd-inetd
38
0010-2: conffiles/etc/init.d/openbsd-inetd
39
0010-2: conffiles/etc/init.d/portmap
39
0010-2: conffiles/etc/init.d/rpcbind
40
0010-2: conffiles/etc/init.d/cron
40
0010-2: conffiles/etc/init.d/cron
41
0010-2: conffiles/etc/init.d/networking
41
0010-2: conffiles/etc/init.d/networking
42
0010-2: conffiles/etc/init.d/klogd
42
0010-2: conffiles/etc/init.d/klogd
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/debian/univention-base-files.maintscripts (+1 lines)
Line 0    Link Here 
1
rm_conffile /etc/univention/templates/files/etc/init.d/portmap 4.0.6-3~
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/debian/univention-base-files.postinst (-1 / +1 lines)
 Lines 64-70   univention-config-registry set cron/autostart?yes \ Link Here 
64
	nscd/autostart?yes \
64
	nscd/autostart?yes \
65
	ntp/autostart?yes \
65
	ntp/autostart?yes \
66
	sshd/autostart?yes \
66
	sshd/autostart?yes \
67
	portmap/autostart?yes \
67
	rpcbind/autostart?yes \
68
68
69
# syslog
69
# syslog
70
if [ "$1" = configure -a -z "$2" ]; then
70
if [ "$1" = configure -a -z "$2" ]; then
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/debian/univention-base-files.univention-config-registry (-1 / +1 lines)
 Lines 49-55   Type: file Link Here 
49
File: etc/init.d/cron
49
File: etc/init.d/cron
50
50
51
Type: file
51
Type: file
52
File: etc/init.d/portmap
52
File: etc/init.d/rpcbind
53
53
54
Type: file
54
Type: file
55
File: etc/init.d/nscd
55
File: etc/init.d/nscd
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-base-files/debian/univention-base-files.univention-service (-7 / +6 lines)
 Lines 26-37   programs=/usr/sbin/ntpd Link Here 
26
start_type=ntp/autostart
26
start_type=ntp/autostart
27
icon=service/ntp
27
icon=service/ntp
28
28
29
[portmap]
29
[rpcbind]
30
Description[de]=Port-Mapper
30
Description[de]=RPC-bind Dienst
31
Description[en]=Port Mapper
31
Description[en]=RPC Bind service
32
programs=/sbin/portmap
32
programs=/sbin/rpcbind
33
start_type=portmap/autostart
33
start_type=rpcbind/autostart
34
icon=service/portmap
34
icon=service/rpcbind
35
35
36
[ssh]
36
[ssh]
37
Description[de]=SSH-Server
37
Description[de]=SSH-Server
38
- 

Return to bug 36571