(Sorry - this is in the scripts module if that's not clear) - Evan
Evan Broder wrote: > Hi, > I think I've got a patch that fixes the postflight script on 10.5. > > There are two things that I fix: first, ps axww seems to for some reason > list lots of processes on 10.5. I will freely admit that I don't > understand the options to ps on OS X or any other platform - I just kept > pulling arguments one at a time until it seemed to do the right thing. > > The other change causes pathsetup.sh to run with the privileges, > environment, and shell scripts of the user that is being sudo'd to. > Currently, pathsetup.sh will try to write to /var/root/.profile as the > normal user, which fails for obvious reasons. > > - Evan Broder > > cvs diff: Diffing installer/resources > Index: installer/resources/postflight > =================================================================== > RCS file: /cvsroot/fink/scripts/installer/resources/postflight,v > retrieving revision 1.13 > diff -u -r1.13 postflight > --- installer/resources/postflight 9 Jun 2006 16:59:14 -0000 1.13 > +++ installer/resources/postflight 4 Feb 2008 02:32:33 -0000 > @@ -16,7 +16,7 @@ > # get ps data for a given PID > sub process_info { > my($pid) = shift; > - my $command = "ps axww -p$pid -o user,ppid,tty,command | tail > -n 1"; > + my $command = "ps xww -p$pid -o user,ppid,tty,command | tail -n 1"; > my @info = split(/\s+/, `$command`, 4); > return ( > user => $info[0], > @@ -40,7 +40,7 @@ > # Running from Installer.app: have Aqua session, so run pathsetup > # as user who ran Installer.app. > my $real_user = $info{user}; > - system "sudo -u $real_user /sw/bin/pathsetup.sh"; > + system "sudo -i -u $real_user /sw/bin/pathsetup.sh"; > system "osascript -e 'tell application \"Installer\"' -e 'activate' > -e 'end tell'"; > } else { > # Running from commandline: not certain to have Aqua session, so > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Fink-devel mailing list > Fink-devel@lists.sourceforge.net > http://news.gmane.org/gmane.os.apple.fink.devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel