individual config file

Bob Rasmussen ras at anzio.com
Thu Dec 15 19:40:29 PST 2011


You may be missing a quick test: have your script display the value of the 
environment variable, and do a read of operator input, at the last 
possible moment. This will tell you whether your environment-setting step 
is working.

On Thu, 15 Dec 2011, Robert T. Repko (R Squared Consultants) wrote:

> Replies in-line
> 
> Believe it or not at 12/15/2011 02:17 PM, Brian K. White said:
> >On 12/15/2011 11:12 AM, Craig Tooker wrote:
> > > On 12/15/2011 10:59, Robert T. Repko (R Squared Consultants) wrote:
> > >> Believe it or not at 12/15/2011 10:47 AM, Kenneth Brody said:
> > >>> On 12/15/2011 10:00 AM, Robert T. Repko (R Squared Consultants) wrote:
> > >>>> Running filePro 5.6 on SCO Unix 5.0.7 Korn shell.
> > >>>> I need to setup individual config files for certain users.  I set the
> > >>>> environment variable PFCONFIG in the users .profile but when I log in
> > >>>> as the user the environment variable doesn't appear and the personal
> > >>>> config file doesn't show.  If I set the variable from the command
> > >>>> prompt it appears and the personal config file shows.
> > >>>>
> > >>>> Entry in .profile
> > >>>> PFCONFIG=/u/appl/fp/lib/config.sam
> > >>>> export PFCONFIG
> > >>>>
> > >>>> What am I missing?
> > >>> What shell are they using?  As I recall, some shells use a file
> > >>> other than "~/.profile".  For example, I believe the C shell 
> > uses "~/.cshrc".
> > >>>
> > >>> --
> > >>> Kenneth Brody
> > >> korn shell
> > >> I made the same entries in .kshrc but it didn't work.
> > >> PFCONFIG=/u/appl/fp/lib/config.sam;export PFCONFIG
> > > You've checked the /etc/passwd file to make sure they are using /bin/ksh
> > > or on your system /bin/sh is a link to /bin/ksh ?  Most Linux
> > > distributions default /bin/sh as a link to /bin/bash.
> > >
> > > Are the lines in this email a cut and paste from the lines in the config
> > > file?
> > >
> > > Craig
> >
> >On SCO OSR5 /bin/sh and /bin/ksh will both read ~/.profile and neither
> >is a link to bash or anything else. /bin/sh is an old bourne shell,
> >stock /bin/ksh is ksh88. ksh93 is available in an add-on but it does not
> >overwrite /bin/ksh. (ksh93 will read ~/.profile too)
> >Bash is available in an add-on too, but unlike in most linux distros,
> >the bash install does not include fake sh or ksh links.
> >
> >On 5.0.6 and 5.0.7 in particular, ~ is in /u by default, which is
> >different from where it was in older versions, /usr,
> >and may be changed in /etc/default/accounts to something more sensible
> >like /home.
> >Lots of opportunities for things to not be where you expect them and few
> >assumptions are safe.
> >
> >.kshrc is the wrong place for this, but never the less it should have
> >worked, so it's interesting that it didn't. That hints at wrong
> >directory or wrong ownerships or permissions.
> 
> I didn't expect it to work but I only put the lines in the .kshrc 
> shell when placing them in .profile didn't work.  Sometimes you try 
> everything you can think of even, if you know it won't work.
> 
> 
> >Please show the following:
> >
> >grep "^username:" /etc/passwd
> 
> rtr:rrQ3xq0aPHulg,..RR:201:50::/u/users/rtr:/bin/ksh
> 
> 
> >ls -l /u/username
> 
> / # ls -l /u/users/rtr
> -rw-------   1 rtr      group       1244 Dec 15 11:00 .kshrc
> -rw-------   1 rtr      sys          181 Nov 21  2001 .netrc
> -rw-------   1 rtr      group       1762 Dec 15 09:25 .profile
> -rw-------   1 rtr      group       1684 Aug 24  2004 .sh_history
> drwx------   2 rtr      group        512 Dec 25  2001 Mail
> drwxr-x---   3 rtr      sys          512 Apr 24  2005 aix
> -rw-rw-rw-   1 rtr      sys         1100 Dec 15 09:17 config
> 
> I only copy/paste the relevant files.
> 
> 
> >ls -lR /u/username
> 
> / # ls -lR /u/users/rtr
> -rw-------   1 rtr      group       1244 Dec 15 11:00 .kshrc
> -rw-------   1 rtr      sys          181 Nov 21  2001 .netrc
> -rw-------   1 rtr      group       1762 Dec 15 09:25 .profile
> -rw-------   1 rtr      group       1684 Aug 24  2004 .sh_history
> drwx------   2 rtr      group        512 Dec 25  2001 Mail
> drwxr-x---   3 rtr      sys          512 Apr 24  2005 aix
> -rw-rw-rw-   1 rtr      sys         1100 Dec 15 09:17 config
> 
> I did not include the directory contents since they are not 
> relevant.  If you absolutely want the directory listings I will 
> include them in a separate posting.
> 
> 
> >cat /u/username/.profile
> 
> /u/users/rtr # cat .profile
> #!/bin/ksh
> # DoubleVision Pro's digiboard call during login...
> [ -x /usr/lib/dv/digi_trigger ] && /usr/lib/dv/digi_trigger
> #       @(#) profile 85.1 99/12/08
> #
> #       Copyright (C) 1990-1999 The Santa Cruz Operation, Inc.
> #               All Rights Reserved.
> #       The information in this file is provided for the exclusive use of
> #       the licensees of The Santa Cruz Operation, Inc.  Such users have the
> #       right to use, modify, and incorporate this code into other products
> #       for purposes authorized by the license agreement provided they include
> #       this notice and the associated copyright notice with any such product.
> #       The information in this file is provided "AS IS" without warranty.
> #
> # .profile      -- Commands executed by a login Korn shell
> #
> 
> [ -d /usr/local/bin -a -x /usr/local/bin ] && PATH=$PATH:/usr/local/bin
> PATH=$PATH:$HOME/bin:.                  # set command search path
> export PATH
> 
> if [ -z "$LOGNAME" ]; then
>          LOGNAME=`logname`               # name of user who logged in
>          export LOGNAME
> fi
> 
> MAIL=/usr/spool/mail/$LOGNAME           # mailbox location
> export MAIL
> 
> if [ -z "$PWD" ]; then
>          PWD=$HOME                       # assumes initial cwd is HOME
>          export PWD
> fi
> 
> if [ -f $HOME/.kshrc -a -r $HOME/.kshrc ]; then
>          ENV=$HOME/.kshrc                # set ENV if there is an rc file
>          export ENV
> fi
> 
> # use default system file creation mask (umask)
> 
> eval `tset -m scoansi:${TERM:-scoansi} -m :\?${TERM:-scoansi} -r -s -Q`
> [ -x /bin/termtype ] && /bin/termtype
> 
> # If job control is enabled, set the suspend character to ^Z (control-z):
> case $- in
> *m*)    stty susp '^z'
>          ;;
> esac
> 
> set -o ignoreeof                        # don't let control-d logout
> 
> case $LOGNAME in                        # include command number in prompt
> root)   PS1="!# " ;;
> *)      PS1="!$ " ;;
> esac
> PFCONFIG=/u/appl/fp/lib/config.sam
> export PS1
> export PFCONFIG
> mesg -y
> /usr/bin/prwarn                 # issue a warning if password due to expire
> 
> 
> >--
> >bkw
> >_______________________________________________
> >Filepro-list mailing list
> >Filepro-list at lists.celestial.com
> >Subscribe/Unsubscribe/Subscription Changes
> >http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> ***************************
> * Robert T. Repko         *
> * R Squared Consultants   *
> * 4 Juniper Ave.          *
> * Easton, PA 18045        *
> * (610) 360-1117 (mobile) *
> * (610) 253-0725 (fax)    *
> *************************** 
> 
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 

Regards,
....Bob Rasmussen,   President,   Rasmussen Software, Inc.

personal e-mail: ras at anzio.com
 company e-mail: rsi at anzio.com
          voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
            fax: (US) 503-624-0760
            web: http://www.anzio.com
 street address: Rasmussen Software, Inc.
                 10240 SW Nimbus, Suite L9
                 Portland, OR  97223  USA


More information about the Filepro-list mailing list