Projet

Général

Profil

0001-debian-deprecate-usage-of-etc-init.d-authentic2-mana.patch

Benjamin Dauvergne, 20 mai 2016 16:05

Télécharger (3,48 ko)

Voir les différences:

Subject: [PATCH] debian: deprecate usage of /etc/init.d/authentic2 manage
 (fixes #11008)

adding a command to /etc/init.d/authentic2 was a bad idea anyway and would
force us to use sudo -E so that /etc/default/authentic2 is visible from
authentic2-ctl.
 debian-jessie/authentic2-ctl         | 4 ++++
 debian-jessie/authentic2.cron.hourly | 6 +++---
 debian-jessie/authentic2.init        | 8 --------
 debian-wheezy/authentic2-ctl         | 4 ++++
 debian-wheezy/authentic2.cron.hourly | 6 +++---
 debian-wheezy/authentic2.init        | 8 --------
 6 files changed, 14 insertions(+), 22 deletions(-)
debian-jessie/authentic2-ctl
13 13
    fi
14 14
fi
15 15

  
16
if [ -f /etc/default/authentic2 ]; then
17
    . /etc/default/authentic2
18
fi
19

  
16 20
if [ -f /etc/authentic2/db.conf ]; then
17 21
    . /etc/authentic2/db.conf
18 22
fi
debian-jessie/authentic2.cron.hourly
1 1
#!/bin/sh
2 2

  
3
/usr/sbin/service authentic2 manage clearsessions
4
/usr/sbin/service authentic2 manage cleanupauthentic
5
/usr/sbin/service authentic2 manage sync-ldap-users
3
/usr/bin/authentic2-ctl clearsessions
4
/usr/bin/authentic2-ctl cleanupauthentic
5
/usr/bin/authentic2-ctl sync-ldap-users
debian-jessie/authentic2.init
195 195
		;;
196 196
	esac
197 197
	;;
198
  manage)
199
    shift
200
    if [ $(id -un) != "$USER" ]; then
201
        sudo -u $USER -- $MANAGE_SCRIPT "$@"
202
    else
203
        $MANAGE_SCRIPT "$@"
204
    fi
205
  ;;
206 198
  *)
207 199
	echo "Usage: $SCRIPTNAME {start|stop|status|restart|update|reload}" >&2
208 200
	exit 3
debian-wheezy/authentic2-ctl
13 13
    fi
14 14
fi
15 15

  
16
if [ -f /etc/default/authentic2 ]; then
17
    . /etc/default/authentic2
18
fi
19

  
16 20
if [ -f /etc/authentic2/db.conf ]; then
17 21
    . /etc/authentic2/db.conf
18 22
fi
debian-wheezy/authentic2.cron.hourly
1 1
#!/bin/sh
2 2

  
3
/usr/sbin/service authentic2 manage clearsessions
4
/usr/sbin/service authentic2 manage cleanupauthentic
5
/usr/sbin/service authentic2 manage sync-ldap-users
3
/usr/bin/authentic2-ctl clearsessions
4
/usr/bin/authentic2-ctl cleanupauthentic
5
/usr/bin/authentic2-ctl sync-ldap-users
debian-wheezy/authentic2.init
195 195
		;;
196 196
	esac
197 197
	;;
198
  manage)
199
    shift
200
    if [ $(id -un) != "$USER" ]; then
201
        sudo -u $USER -- $MANAGE_SCRIPT "$@"
202
    else
203
        $MANAGE_SCRIPT "$@"
204
    fi
205
  ;;
206 198
  *)
207 199
	echo "Usage: $SCRIPTNAME {start|stop|status|restart|update|reload}" >&2
208 200
	exit 3
209
-