[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Fri, 28 Jan 2005 13:15:55 +0000 
Subject:Re: New package for V15.6, now with installation script (Correction) 
From:Stephen Isard 
Volume-ID: 

jeffb@jtbest.demon.co.uk wrote:

> If the reason you are checking for "root" privileges is that you want to
> put files in standard locations, then it might just be better to
> determine if you have write access to /usr/bin, etc.

Yes, I think this is the crux.  However, I think that instead of trying
to guess at alternatives, it would be best just to do nothing, except
perhaps to print a message suggesting that the user could put the
relevant files in their path.  An alternative would be to let the user
set $PREFIX variables as in the configure scripts of many packages.

Stephen Isard
>From Andreas.Eder@gmx.net Thu Jan 27 17:27:15 2005
Path: news.demon.co.uk!mutlu.news.demon.net!peer-uk.news.demon.net!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail
Newsgroups: comp.lang.pop
Subject: Re: New package for V15.6, now with installation script
 (Correction)
References: <ct8d9a$28h5$1@soapbox.cs.bham.ac.uk> <41F8EF98.EFCEA3BA@cstr.ed.ac.DELETETHISuk>
From: Andreas Eder <Andreas.Eder@gmx.net>
Date: Thu, 27 Jan 2005 18:27:15 +0100
Message-ID: <m3fz0m4wb0.fsf@banff.eder.de>
Organization: eder
User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Corporate Culture,
 linux)
Cancel-Lock: sha1:oSZunNAH7AAC4/Wzn6Rsk9qKVHo=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 28
NNTP-Posting-Date: 27 Jan 2005 18:30:05 MET
NNTP-Posting-Host: 29033bc8.newsread4.arcor-online.net
X-Trace: DXC=Tm0>Z=4Na>J4mA>;52^R7K:ejgIfPPldDjW\KbG]kaMHAV6U:Z=fE=OSTIT\OHYELF<>n50oJJkLBLEWLMCgHE@F
X-Complaints-To: abuse@arcor.de
Xref: news.demon.co.uk comp.lang.pop:1400

Stephen Isard <stepheni@cstr.ed.ac.DELETETHISuk> writes:

> A.Sloman@cs.bham.ac.uk wrote:
>
>> How does a bash script test if it is run by superuser?
>
> if [ `whoami` == root ]
> then
> # your commands here, e.g.,
> echo yes
> else
> # alternative commands, e.g.,
> echo no
> fi
>
> works on my fedora core 1 linux system.  I don't know whether the whoami
> command is absolutely universal.  Man pages describe it as equivalent to
> "id -un", as if that were more basic.  You could also test the values of
> the $USER or $UID environment variables, but again I don't know whether
> there are systems which don't set those variables.
>

I think the best would probably be to just test wether the effective
uid of the process running is 0 which can be done by 'id -u'

'Andreas
-- 
Wherever I lay my .emacs, there's my $HOME.
>From A.Sloman@cs.bham.ac.uk Tue Jan 18 12:24:59 2005
Path: news.demon.co.uk!mutlu.news.demon.net!peer-uk.news.demon.net!kibo.news.demon.net!demon!logbridge.uoregon.edu!feed3.jnfs.ja.net!feed2.jnfs.ja.net!jnfs.ja.net!news.bham.ac.uk!bhamcs!news
From: A.Sloman@cs.bham.ac.uk
Newsgroups: comp.lang.pop
Subject: New package for V15.6, now with installation script
Date: Tue, 18 Jan 2005 12:24:59 +0000 (UTC)
Organization: cs.bham.ac.uk MAIL->NEWS gateway
Lines: 67
Message-ID: <csiv6r$1fh7$1@soapbox.cs.bham.ac.uk>
X-Trace: soapbox.cs.bham.ac.uk 1106051099 48679 147.188.192.10 (18 Jan 2005 12:24:59 GMT)
X-Complaints-To: abuse@cs.bham.ac.uk
X-Relay-Info: Relayed through cs.bham.ac.uk MAIL->NEWS gateway
Originator: exim@emily
Xref: news.demon.co.uk comp.lang.pop:1388

Testers required:

A new script to untar and install the v15.6 package (now slightly
modified -- including new version number) is available.

Full instructions here:

	http://www.cs.bham.ac.uk/research/poplog/v15.6/AREADME.txt

Basically these are the steps required

Fetch, make executable, and run this (if you have not previously
done so):
    http://www.cs.bham.ac.uk/research/poplog/v15.6/CHECK_LINUX_FACILITIES

    chmod 755 CHECK_LINUX_FACILITIES
    ./CHECK_LINUX_FACILITIES

That will test whehter your installation is OK for poplog, and if run
as root may insert some missing .so links to libraries in
/usr/X11R6/lib

Fetch main tar bundle (about 18MB):
    http://www.cs.bham.ac.uk/research/poplog/bham-linux-poplog-v15.6.tar.gz

Fetch install script (into same directory as tar bundle)
and make it executable

    http://www.cs.bham.ac.uk/research/poplog/v15.6/INSTALL_BHAM_LINUX_POPLOG

    chmod 755 INSTALL_BHAM_LINUX_POPLOG

Run it without arguments to get instructions

    ./INSTALL_BHAM_LINUX_POPLOG

Install poplog in preferred mode in preferred directory.
Recommended command for most people:

    ./INSTALL_POPLOG motif bham default > install.log

	Installs in /usr/local/poplog (needs root privilege
	to create the directory if it does not exits)

Then look at demo scripts for testing the installation and advice
on running poplog in here:

    /usr/local/poplog/v15.6/bin/demos/

Most users will find that everything works as before, except that
installation is faster and total file space required is reduced.
Not everything that was in the previous bham bundle is included.
There are still loose ends to be fixed and documentation to be
updated (lots of documenation).

Thins that used to be in $poplocal/local are now mainly in

	$usepop/pop/packages

though some have been moved into system directories, e.g. to
fix bugs or extend facilities. See
	http://www.cs.bham.ac.uk/research/poplog/v15.6/MOVED/

Aaron