Subversion Repositories DevTools

Rev

Rev 6914 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6914 dpurdie 1
#!/bin/bash
2
#
3
#	This script is a part of the 'buildtool' - the JATS automated build system
4
#
5
#	Installation locatation
6
#	This script must be installed into:
7
#		/home/releasem/sbin/jatsTool on the dpkg_archive server
7358 dpurdie 8
#
6914 dpurdie 9
#	Sudo Configuration
10
#	Correct operation relies on the use of Sudo. sudo must be configured with:
11
#		releasem        ALL=(buildadm) NOPASSWD: /home/releasem/sbin/jatsTool
7358 dpurdie 12
#		releasem        ALL=(pkgadm)   NOPASSWD: /home/releasem/sbin/jatsTool
6914 dpurdie 13
#
14
#	Operation:
15
#	A master deamon withint the buildtool will invoke the command
16
#		sudo -n -u buildadm /home/releasem/sbin/jatsTool assemble_dpkg ...
17
#	after conecting to the dpkg_archive server as the 'releasem' user
18
#
19
#	The script will:
7358 dpurdie 20
#		* Ensure that the user is running as 'buildadm' or 'pkgadm'
6914 dpurdie 21
#		* Setup the execution environment to ensure that JATS can run
22
#		* Run jats an invove he maned tool with provided arguments
7358 dpurdie 23
#
24
#   Note: pkgadm is the prefered user
25
#         buildadm was the required user - until a rouge test deleted too much stuff
6914 dpurdie 26
#	
27
#
7358 dpurdie 28
if [ $USER != "buildadm" -a $USER != "pkgadm" ] ; then
29
     echo "This script MUST be run as buildadm or pkgadm, not as $USER"
6914 dpurdie 30
     exit 1
31
fi
32
source /etc/profile
33
jats etool "$@"
34