Subversion Repositories DevTools

Rev

Rev 7358 | 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:
7358 dpurdie 11
#		releasem        ALL=(pkgadm)   NOPASSWD: /home/releasem/sbin/jatsTool
6914 dpurdie 12
#
13
#	Operation:
14
#	A master deamon withint the buildtool will invoke the command
7359 dpurdie 15
#		sudo -n -u pkgadm /home/releasem/sbin/jatsTool assemble_dpkg ...
6914 dpurdie 16
#	after conecting to the dpkg_archive server as the 'releasem' user
17
#
18
#	The script will:
7359 dpurdie 19
#		* Ensure that the user is running as 'pkgadm'
6914 dpurdie 20
#		* Setup the execution environment to ensure that JATS can run
21
#		* Run jats an invove he maned tool with provided arguments
7358 dpurdie 22
#
7359 dpurdie 23
if [ $USER != "pkgadm" ] ; then
24
     echo "This script MUST be run as pkgadm, not as $USER"
6914 dpurdie 25
     exit 1
26
fi
27
source /etc/profile
28
jats etool "$@"
29