× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You can use one of the built-in BASH variables to detect BASH. Much faster
that way.
 
If you need to detect other PASE shells vs QSH, then trying to run
/QSYS.LIB/QSHELL.PGM/UNAME.PGM is one way, though I never particularly
cared for it (it was and still is a hack).
 
 

----- Original message -----
From: John Yeung <gallium.arsenide@xxxxxxxxx>
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] Re: [IBMiOSS] installing with iACS package
management
Date: Thu, Jun 13, 2019 12:08 PM
 
On Thu, Jun 13, 2019 at 11:56 AM Kevin Adler <kadler@xxxxxxxxxx> wrote:
>
>    Jack, can you please stop repeating these outdated instructions:
>    # detect if we're in a PASE shell /QSYS.LIB/QSHELL.LIB/UNAME.PGM >
>    /dev/null 2>&1
>    if [ $? != 0 -a "$SHELL" != "/QOpenSys/pkgs/bin/bash" ] then
>    exec /QOpenSys/pkgs/bin/bash
>
>    Please, for the love of everything, use the flippin' procedure:
>  
 [1][1]https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzajq/rzajqprocsetpaseshellinfo.htm

No doubt those instructions are outdated, but I think there is still
some demand for being able to detect whether a session was invoked via
(1) QSH on 5250, (2) QP2TERM on 5250, or (3) SSH with proper TTY
capability. As such, it would be nice to have a .profile that works
sensibly under all conditions.

Personally, given the horrific interaction between 5250 and the
RPM-based bash, I would prefer not to invoke bash automatically unless
coming in from SSH.

>    Also, your example .profile doesn't even show how to set the PATH
variable
>    in it. Refer to
>  
 [2][2]https://bitbucket.org/ibmi/opensource/src/master/docs/yum/#markdown-header-adjusting-your-path ;

Well, to be fair, the example .profile may have been written with the
assumption that if you want to ultimately be using bash, you'll have a
.bashrc and set your PATH there.

John Y.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [3]https://lists.midrange.com/mailman/listinfo/opensource ;
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [4]https://archive.midrange.com/opensource ;.

Help support midrange.com by shopping at amazon.com with our affiliate
link: [5]https://amazon.midrange.com ;
 

 

References

Visible links
1. https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzajq/rzajqprocsetpaseshellinfo.htm
2. https://bitbucket.org/ibmi/opensource/src/master/docs/yum/#markdown-header-adjusting-your-path
3. https://lists.midrange.com/mailman/listinfo/opensource
4. https://archive.midrange.com/opensource
5. https://amazon.midrange.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.