... the script

The FAQchest faqchest at abac.com
Thu Nov 15 10:14:09 CST 2001

Mmm!, The attachment didn't made it. Let's see if inline it doesn't get
damage by the line wrapping.  Thierry (thierryv at abac.com).




user_id=`id | sed -e 's/uid=//' | sed -e 's/(.*$//'`

if [ $# -ne 0 ]; then
  if [ $1 -eq '-noroot' ]; then

if [ $user_id -eq 0 ]; then
  echo 'Content-Type: text/plain; charset=iso-8859-1'
  echo ''
  echo "Sorry, you can not be running as 'root' in order to run this script."

perl_loc=`which perl | grep perl | sed -e 's,/perl,,'`

if [ ! -x $perl_loc/perl ]; then
  echo 'Content-Type: text/plain; charset=iso-8859-1'
  echo ''
  echo "Error, can not locate 'perl' to run this script."

chmod +x $perl_loc/perl
eval "exec $perl_loc/perl -x $0 $*"

## Everything below is a perl script. 
## The preceding line tells perl -x
## where to start reading code.

umask 022;
$| = 1;

print STDOUT "Content-Type: text/plain; charset=iso-8859-1\n\n";
print STDOUT "Yup\n";

## The rest of your script goes here
## END


The posting address is: san-diego-pm-list at hfb.pm.org

List requests should be sent to: majordomo at hfb.pm.org

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.

More information about the San-Diego-pm mailing list