SCIENTIFIC-LINUX-DEVEL Archives

March 2007

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stephan Wiesand <[log in to unmask]>
Reply To:
Stephan Wiesand <[log in to unmask]>
Date:
Wed, 21 Mar 2007 16:28:43 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (51 lines)
Hi again,

On Wed, 21 Mar 2007, Stephan Wiesand wrote:

> modulo the quoting required to prevent the `fs wscell` from being evaluated 
> on the build machine (I think it doesn't really matter whether it's evaluated

that, of course, was nonsense. It's not evaluated during build, and it 
*is* important that it's evaluated in the init script and not during 
%post.


There's a first cut in http://www-zeuthen.desy.de/~wiesand/SL/

The interesting part of the spec is:


%post

fs setcell `fs wscell |cut -d \' -f2` -nosuid >/dev/null 2>&1
:

%triggerin -- openafs

grep -q nosuid /etc/init.d/afs && exit 0
sed -i "/AFS_POST_INIT/ifs setcell \`fs wscell |cut -d \\\' -f2\` -nosuid" 
/etc/init.d/afs
:

%postun

sed -i '/nosuid/d' /etc/init.d/afs
:


Tested:
  - %post does its job, failing quietly if no client running
  - trigger does its job, whether or not a client is running
  - %postun returns the file to its previous state


Anything I missed?

   Stephan

-- 
Stephan Wiesand
   DESY - DV -
   Platanenallee 6
   15738 Zeuthen, Germany

ATOM RSS1 RSS2