#!/bin/bash # # This script is a part of the 'buildtool' - the JATS automated build system # # Installation locatation # This script must be installed into: # /home/releasem/sbin/jatsTool on the dpkg_archive server # # Sudo Configuration # Correct operation relies on the use of Sudo. sudo must be configured with: # releasem ALL=(pkgadm) NOPASSWD: /home/releasem/sbin/jatsTool # # Operation: # A master deamon withint the buildtool will invoke the command # sudo -n -u pkgadm /home/releasem/sbin/jatsTool assemble_dpkg ... # after conecting to the dpkg_archive server as the 'releasem' user # # The script will: # * Ensure that the user is running as 'pkgadm' # * Setup the execution environment to ensure that JATS can run # * Run jats an invove he maned tool with provided arguments # if [ $USER != "pkgadm" ] ; then echo "This script MUST be run as pkgadm, not as $USER" exit 1 fi source /etc/profile jats etool "$@"