Update of /cvsroot/fink/scripts/installer/resources
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29979

Modified Files:
        postflight 
Log Message:
cleaner scoping for the cli vs .app situations


Index: postflight
===================================================================
RCS file: /cvsroot/fink/scripts/installer/resources/postflight,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- postflight  9 Jun 2006 16:54:37 -0000       1.12
+++ postflight  9 Jun 2006 16:59:14 -0000       1.13
@@ -34,22 +34,23 @@
        %info = process_info($info{parent});
 }
 
-# For a command-line install, installer is already run as root, so get its 
parent.
-%info = process_info($info{parent}) if $ENV{COMMAND_LINE_INSTALL};
-
-my $real_user = $info{user};
-
-
 # set up user's shell for fink
 # NB: pathsetup.sh requires an Aqua session
 if(!$ENV{COMMAND_LINE_INSTALL}) {
-       # Running from Installer.app: have Aqua session, so run pathsetup.
+       # 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 "osascript -e 'tell application \"Installer\"' -e 'activate' -e 
'end tell'";
 } else {
        # Running from commandline: not certain to have Aqua session, so
        # don't run pathsetup. Instead print message to terminal about
        # what to do.
+
+       # For a command-line install, installer is already run as root, so
+       # get its parent.
+       %info = process_info($info{parent});
+
        open(TTY, ">", "/dev/$info{tty}") or *TTY = *STDOUT;;
        print TTY <<END_MESSAGE;
 



_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to