AIX Open Source

 View Only
Expand all | Collapse all

Removal of symlink/files from /usr for AIX Toolbox packages

  • 1.  Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Thu September 17, 2020 08:53 AM


    Over the years we have seen some issues where packages from AIX toolbox and base AIX have conflict.

    This happens because some of the open source rpm packages creates symlinks in /usr or install in /usr, sometime this causes overwriting of base AIX symlinks.

    For example some libraries and utilities are provided by both base AIX and open source rpm packages and when rpm packages get installed they overwrite base AIX provided files/links.

    We have fixed these issues over the time but we do not want this to ever happen again.

    Also we want to have AIX toolbox/open source environment separate from base AIX. 

    Hence AIX toolbox packages are not going to provide binaries, libraries and include files in /usr.

    Going forward with each packages update from AIX toolbox it will be verified that package should not provide any files/symblinks in /usr.

    This will make sure we do not overwrite anything on base AIX and create a totally separate environment in /opt/freeware for open source packages that does not conflict with base AIX. 

    Please make sure if you use /usr path for any of the binaries, libraries or include files from AIX toolbox then change it to /opt/freeware. 

    You can always add /opt/freeware/bin and /opt/freeware/sbin path in your PATH environment variable. 

    Thanks 



    ------------------------------
    SANKET RATHI
    ------------------------------


  • 2.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Mon September 21, 2020 04:22 AM
    Edited by C- -T Mon September 21, 2020 04:28 AM
    yeah, very cool...who cares, a quick posting on friday afternoon about a major change in your packaging strategy...no problem. this made my monday morning experiency a real bad one.

    new rsync package came in without /usr links and broke out whole batch/deployment runs...

    thumbs up!

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 3.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Mon September 21, 2020 06:18 AM
    Sorry to hear that. But if you really need a /usr link then you can manually add that.
    We have seen lot of problems with providing /usr link on other packages and trying to be consistent (by not providing for any packages)
    Right now some packages have link in /usr and some do not. 
    It has to be done at some point otherwise it will continue like that. 
    We know this can cause issues in some environment but please cooperate with us.
    We are making all this effort to eventually have a better experience.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 4.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Tue October 06, 2020 05:15 AM
    does this effect the bash package also? we are using "/usr/bin/bash" as the root shell. if this link is removed, this will lead to a serious disaster.

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 5.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Tue October 06, 2020 05:21 AM
    Edited by SANKET RATHI Tue October 06, 2020 05:22 AM
    We understand that lot of people would be using /usr/bin/bash in their scripts and hence we are not going to remove bash from /usr/bin.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 6.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Wed October 07, 2020 02:40 AM
    While I can understand wanting to use bash, it is an ok shell if you "set -o vi",  but changing the default shell of the root user is typically not recommended in any unix system. This will affect all system scripts and can lead to strange and unknown bugs. I would not sleep well at night with that.

    ------------------------------
    Morten Torstensen
    ------------------------------



  • 7.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Wed October 07, 2020 02:50 AM
    bash is not an "ok" shell, its an shell like any other but with some modern conveniences. dont worry, as long  bash stays in "/usr/bin",  i sleep very well.
    its 2020 already, so what.

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 8.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Wed October 14, 2020 06:52 AM
    Very good point! IBM AIX Support will not support bash, and the boot and kernel experts have had cases with script failures during boot, and cron phases, and will insist the shell be set to ksh for support.

    ------------------------------
    Jan Harris
    ------------------------------



  • 9.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Wed November 25, 2020 06:37 AM
    Edited by C- -T Wed November 25, 2020 06:37 AM
    we have hundreds of aix lpars  which produces dozens of pmr's anually, and i can not remember that aix support ever asked us to switch shells.
    we will not doing it anyway.

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 10.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Wed November 25, 2020 08:30 AM
    I think here point is changing the default system shell to bash. This means /usr/bin/sh is pointing to bash.
    There are many scripts those uses "#!" with /usr/bin/sh in AIX and they assume it is ksh.
    So if any users default shell is bash that is fine, that will come in effect when user will login but systems default shell should not change.
    I hope this clarifies some of the doubts.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 11.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Wed November 25, 2020 05:30 AM
    That should only affect scripts that don't specify the shell after the "#!" magic number.

    ------------------------------
    José Pina Coelho
    ------------------------------



  • 12.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Fri October 16, 2020 08:39 AM
    Hello

    You also have to keep in mind that if you use Ansible synchronize (rsync), it wants to find the command in "/usr/bin/rsync". So it is mandatory to create the symbolic link.

    Another option is to set the Ansible option: rsync_path or the variable asnible_rsync_path, but this I have to test. In this way I would not have to recreate the symbolic link in the 200 AIX lpars that I have to update soon.

    Regards


    ------------------------------
    Luis Tejeda Alcolea
    ------------------------------



  • 13.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Tue October 13, 2020 05:15 PM
    Hi Sanket

    Can you advise if gettext libintl.a is in plan to be updated, and will they remove the symlinks?

    Version 0.19.8.1 introduced open source libiconv, which causes some issues for some AIX customer applications.

    /usr/lib/libintl.a -> ../../opt/freeware/lib/libintl.a

    # dump -X64 -Tv /usr/lib/libintl.a |grep libiconv.a
    [59] 0x00000000 undef IMP DS EXTref /opt/freeware/lib/libiconv.a(libiconv.so.2) libiconv_open
    [60] 0x00000000 undef IMP DS EXTref /opt/freeware/lib/libiconv.a(libiconv.so.2) libiconv
    [61] 0x00000000 undef IMP DS EXTref /opt/freeware/lib/libiconv.a(libiconv.so.2) libiconv_set_relocation_prefix
    [40] 0x00000000 undef IMP DS EXTref libiconv.a(shr4_64.o) iconv_close
    [41] 0x00000000 undef IMP DS EXTref libiconv.a(shr4_64.o) iconv
    [42] 0x00000000 undef IMP DS EXTref libiconv.a(shr4_64.o) iconv_open


    ------------------------------
    Jan Harris
    ------------------------------



  • 14.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Thu January 28, 2021 12:36 AM
    Hi Jan,
    While I can't answer regarding this specific package what I would do is download the package, extract it to a local directory and (assuming it's an RPM) and read the SPEC file to see if it has any `ln` commands embedded. Following that I'd just manually place the package components. Personally I would dread having surprise changes to system directories.
    Good luck!
    -Steve


    ------------------------------
    Steve Yarmie
    ------------------------------



  • 15.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Thu January 28, 2021 06:03 AM
    Hi Jan,
    Yes AIX toolbox provided libinti and libiconv will not have link in /usr

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 16.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Fri January 27, 2023 10:02 AM
    Hello Sanket,

    In our company we have also struggled with this decision. The "solution" you suggest (to edit $PATH) also didn't properly solve all issues. For example, when executing scripts as root with HP Server Automation from Microfocus, the $PATH of the root user isn't loaded and scripts fail to run. It isn't documented anywhere where HP Server Automation gets its $PATH from and I also wasn't able to find it). Cron jobs also have a similar problem.

    As our AIX servers are mostly running legacy software, for which often the person knowing it might not even be alive or working for us anymore, it is not realistic to demand all code to be updated for this "new policy".

    Thus the only solution I see, is to recreate the symlinks after updating AIX Toolbox has removed them...

    The annoying thing is that I wasn't able to find a comprehensive list of which links are being removed by updating AIX Toolbox. I had to list /usr/s?bin before updating AIX Toolbox and once again after, and then run a diff to find out which link are removed. Some packages (like wget) explicitly say that the link will be removed, but most other packages just remove the link without saying anything.
    Can you please properly document this in the future (and retroactively also the past), so that I don't have to resort to user-error-sensitive methods like diff... Thanks!

    Next I was also wondering if the so called conflicts with AIX OS packages are preventable by not creating the symlink if the link file already exists? Would you consider it "ok" to run the following code in our environment for recreating the links? (keeping in mind that these are legacy AIX 7.1 and 7.2 environments that won't get many changes anymore, like new packages. Only security updates)
    #!/bin/bash
    
    declare -a LINKS_TO_CREATE=( \
      "/usr/bin/db_archive	../../opt/freeware/bin/db_archive" \
      "/usr/bin/db_checkpoint	../../opt/freeware/bin/db_checkpoint" \
      "/usr/bin/db_deadlock	../../opt/freeware/bin/db_deadlock" \
      "/usr/bin/db_dump	../../opt/freeware/bin/db_dump" \
      "/usr/bin/db_hotbackup	../../opt/freeware/bin/db_hotbackup" \
      "/usr/bin/db_load	../../opt/freeware/bin/db_load" \
      "/usr/bin/db_printlog	../../opt/freeware/bin/db_printlog" \
      "/usr/bin/db_recover	../../opt/freeware/bin/db_recover" \
      "/usr/bin/db_stat	../../opt/freeware/bin/db_stat" \
      "/usr/bin/db_upgrade	../../opt/freeware/bin/db_upgrade" \
      "/usr/bin/db_verify	../../opt/freeware/bin/db_verify" \
      "/usr/bin/envsubst	../../opt/freeware/bin/envsubst" \
      "/usr/bin/gettext	../../opt/freeware/bin/gettext" \
      "/usr/bin/gettext.sh	../../opt/freeware/bin/gettext.sh" \
      "/usr/bin/msgattrib	../../opt/freeware/bin/msgattrib" \
      "/usr/bin/msgcat	../../opt/freeware/bin/msgcat" \
      "/usr/bin/msgcmp	../../opt/freeware/bin/msgcmp" \
      "/usr/bin/msgcomm	../../opt/freeware/bin/msgcomm" \
      "/usr/bin/msgconv	../../opt/freeware/bin/msgconv" \
      "/usr/bin/msgen	../../opt/freeware/bin/msgen" \
      "/usr/bin/msgexec	../../opt/freeware/bin/msgexec" \
      "/usr/bin/msgfilter	../../opt/freeware/bin/msgfilter" \
      "/usr/bin/msgfmt	../../opt/freeware/bin/msgfmt" \
      "/usr/bin/msggrep	../../opt/freeware/bin/msggrep" \
      "/usr/bin/msginit	../../opt/freeware/bin/msginit" \
      "/usr/bin/msgmerge	../../opt/freeware/bin/msgmerge" \
      "/usr/bin/msgunfmt	../../opt/freeware/bin/msgunfmt" \
      "/usr/bin/msguniq	../../opt/freeware/bin/msguniq" \
      "/usr/bin/ngettext	../../opt/freeware/bin/ngettext" \
      "/usr/bin/recode-sr-latin	../../opt/freeware/bin/recode-sr-latin" \
      "/usr/bin/xgettext	../../opt/freeware/bin/xgettext" \
      "/usr/bin/curl	../../opt/freeware/bin/curl" \
      "/usr/bin/sqlite3	../../opt/freeware/bin/sqlite3" \
      "/usr/bin/rsync	../../opt/freeware/bin/rsync" \
      "/usr/bin/wget	../../opt/freeware/bin/wget" \
      "/usr/bin/xmlwf	../../opt/freeware/bin/xmlwf" \
      "/usr/bin/git	../../opt/freeware/bin/git" \
      "/usr/sbin/lsof	../../opt/freeware/sbin/lsof" \
    )
    
    for LINK_TO_CREATE in "${LINKS_TO_CREATE[@]}"; do
      LINK_FILE="$(echo ${LINK_TO_CREATE} | awk '{print $1}')"
      LINK_TARGET="$(echo ${LINK_TO_CREATE} | awk '{print $2}')"
      
      if [[ -e "${LINK_FILE}" ]]; then
        echo "Link file path ${LINK_FILE} is not available (details on the line below)! Not creating the link..."
        ls -la "${LINK_FILE}"
        echo
      else
        if [[ -e "$(dirname "${LINK_FILE}")/${LINK_TARGET}" ]]; then
          ln -s "${LINK_TARGET}" "${LINK_FILE}"
        else
          echo "Link target $(dirname "${LINK_FILE}")/${LINK_TARGET} does not exist! Not creating the link..."
          echo
        fi
      fi
    done​

    Thanks for your hard work!




    ------------------------------
    Maarten Van der Auwera
    ------------------------------



  • 17.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Fri January 27, 2023 10:25 AM
    Welcome to the difficulty of running two package managers. Conflicts
    between packages blindly overwrite each other as both package managers
    assert their ownership.

    IMHO the toolkit RPMs should only maintain files in /opt/freeware,
    period. FreeBSD has the right idea where the core OS is /usr, and
    packages are installed in a separate location (ie: /usr/local). I'm
    glad to see that the Toolkit is trying to follow a similar design by
    writing only to /opt/freeware.

    While I appreciate the work the maintainers put into the toolkit which
    keeps OSS software functional on AIX, I no longer use it. I also
    recommend my customers not use it.

    I'm sure that's an unpopular opinion, but it's supported by my
    experience. The massive dependency hell, symlink issues, internet
    access requirements, and upstream untrusted code sourcing all
    contribute to my position that the Toolkit has no place in a
    production AIX environment.

    Sudo is the most popular request, and you can download a single
    standalone RPM from https://www.sudo.ws/getting/download/ . It's still
    unsupported by IBM, and you're managing access to the root account
    with it. At least it's a single file.

    Regarding PATH, have you tried updating /etc/environment instead of
    just shell profiles?


    On Fri, Jan 27, 2023 at 03:02:30PM +0000, Maarten Van der Auwera via IBM Community wrote:
    > Hello Sanket,
    >
    > In our company we have also struggled with this decision. The
    > "solution" you suggest (to edit $PATH) also didn't properly solve
    > all issues. For example, when executing scripts as root with HP
    > Server Automation from Microfocus, the $PATH of the root user isn't
    > loaded and scripts fail to run. It isn't documented anywhere where
    > HP Server Automation gets its $PATH from and I also wasn't able to
    > find it). Cron jobs also have a similar problem.
    >
    > As our AIX servers are mostly running legacy software, for which
    > often the person knowing it might not even be alive or working for
    > us anymore, it is not realistic to demand all code to be updated for
    > this "new policy".
    >
    > Thus the only solution I see, is to recreate the symlinks after
    > updating AIX Toolbox has removed them...
    >
    > The annoying thing is that I wasn't able to find a comprehensive
    > list of which links are being removed by updating AIX Toolbox. I had
    > to list /usr/s?bin before updating AIX Toolbox and once again after,
    > and then run a diff to find out which link are removed. Some
    > packages (like wget) explicitly say that the link will be removed,
    > but most other packages just remove the link without saying
    > anything. Can you please properly document this in the future (and
    > retroactively also the past), so that I don't have to resort to
    > user-error-sensitive methods like diff... Thanks!
    >
    > Next I was also wondering if the so called conflicts with AIX OS
    > packages are preventable by not creating the symlink if the link
    > file already exists? Would you consider it "ok" to run the following
    > code in our environment for recreating the links? (keeping in mind
    > that these are legacy AIX 7.1 and 7.2 environments that won't get
    > many changes anymore, like new packages. Only security updates)
    >
    > #!/bin/bash
    >
    > declare -a LINKS_TO_CREATE=( \
    > "/usr/bin/db_archive ../../opt/freeware/bin/db_archive" \
    > "/usr/bin/db_checkpoint ../../opt/freeware/bin/db_checkpoint" \
    > "/usr/bin/db_deadlock ../../opt/freeware/bin/db_deadlock" \
    > "/usr/bin/db_dump ../../opt/freeware/bin/db_dump" \
    > "/usr/bin/db_hotbackup ../../opt/freeware/bin/db_hotbackup" \
    > "/usr/bin/db_load ../../opt/freeware/bin/db_load" \
    > "/usr/bin/db_printlog ../../opt/freeware/bin/db_printlog" \
    > "/usr/bin/db_recover ../../opt/freeware/bin/db_recover" \
    > "/usr/bin/db_stat ../../opt/freeware/bin/db_stat" \
    > "/usr/bin/db_upgrade ../../opt/freeware/bin/db_upgrade" \
    > "/usr/bin/db_verify ../../opt/freeware/bin/db_verify" \
    > "/usr/bin/envsubst ../../opt/freeware/bin/envsubst" \
    > "/usr/bin/gettext ../../opt/freeware/bin/gettext" \
    > "/usr/bin/gettext.sh ../../opt/freeware/bin/gettext.sh" \
    > "/usr/bin/msgattrib ../../opt/freeware/bin/msgattrib" \
    > "/usr/bin/msgcat ../../opt/freeware/bin/msgcat" \
    > "/usr/bin/msgcmp ../../opt/freeware/bin/msgcmp" \
    > "/usr/bin/msgcomm ../../opt/freeware/bin/msgcomm" \
    > "/usr/bin/msgconv ../../opt/freeware/bin/msgconv" \
    > "/usr/bin/msgen ../../opt/freeware/bin/msgen" \
    > "/usr/bin/msgexec ../../opt/freeware/bin/msgexec" \
    > "/usr/bin/msgfilter ../../opt/freeware/bin/msgfilter" \
    > "/usr/bin/msgfmt ../../opt/freeware/bin/msgfmt" \
    > "/usr/bin/msggrep ../../opt/freeware/bin/msggrep" \
    > "/usr/bin/msginit ../../opt/freeware/bin/msginit" \
    > "/usr/bin/msgmerge ../../opt/freeware/bin/msgmerge" \
    > "/usr/bin/msgunfmt ../../opt/freeware/bin/msgunfmt" \
    > "/usr/bin/msguniq ../../opt/freeware/bin/msguniq" \
    > "/usr/bin/ngettext ../../opt/freeware/bin/ngettext" \
    > "/usr/bin/recode-sr-latin ../../opt/freeware/bin/recode-sr-latin" \
    > "/usr/bin/xgettext ../../opt/freeware/bin/xgettext" \
    > "/usr/bin/curl ../../opt/freeware/bin/curl" \
    > "/usr/bin/sqlite3 ../../opt/freeware/bin/sqlite3" \
    > "/usr/bin/rsync ../../opt/freeware/bin/rsync" \
    > "/usr/bin/wget ../../opt/freeware/bin/wget" \
    > "/usr/bin/xmlwf ../../opt/freeware/bin/xmlwf" \
    > "/usr/bin/git ../../opt/freeware/bin/git" \
    > "/usr/sbin/lsof ../../opt/freeware/sbin/lsof" \
    > )
    >
    > for LINK_TO_CREATE in "${LINKS_TO_CREATE[@]}"; do
    > LINK_FILE="$(echo ${LINK_TO_CREATE} | awk '{print $1}')"
    > LINK_TARGET="$(echo ${LINK_TO_CREATE} | awk '{print $2}')"
    >
    > if [[ -e "${LINK_FILE}" ]]; then
    > echo "Link file path ${LINK_FILE} is not available (details on the line below)! Not creating the link..."
    > ls -la "${LINK_FILE}"
    > echo
    > else
    > if [[ -e "$(dirname "${LINK_FILE}")/${LINK_TARGET}" ]]; then
    > ln -s "${LINK_TARGET}" "${LINK_FILE}"
    > else
    > echo "Link target $(dirname "${LINK_FILE}")/${LINK_TARGET} does not exist! Not creating the link..."
    > echo
    > fi
    > fi
    > done
    >
    > Thanks for your hard work!
    >
    >
    >
    >
    > ------------------------------
    > Maarten Van der Auwera
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Thu September 17, 2020 08:53 AM
    > From: SANKET RATHI
    > Subject: Removal of symlink/files from /usr for AIX Toolbox packages
    >
    >
    >
    > Over the years we have seen some issues where packages from AIX
    > toolbox and base AIX have conflict.
    >
    > This happens because some of the open source rpm packages creates
    > symlinks in /usr or install in /usr, sometime this causes
    > overwriting of base AIX symlinks.
    >
    > For example some libraries and utilities are provided by both base
    > AIX and open source rpm packages and when rpm packages get installed
    > they overwrite base AIX provided files/links.
    >
    > We have fixed these issues over the time but we do not want this to
    > ever happen again.
    >
    > Also we want to have AIX toolbox/open source environment separate
    > from base AIX.
    >
    > Hence AIX toolbox packages are not going to provide binaries,
    > libraries and include files in /usr.
    >
    > Going forward with each packages update from AIX toolbox it will be
    > verified that package should not provide any files/symblinks in
    > /usr.
    >
    > This will make sure we do not overwrite anything on base AIX and
    > create a totally separate environment in /opt/freeware for open
    > source packages that does not conflict with base AIX.
    >
    > Please make sure if you use /usr path for any of the binaries,
    > libraries or include files from AIX toolbox then change it to
    > /opt/freeware.
    >
    > You can always add /opt/freeware/bin and /opt/freeware/sbin path in
    > your PATH environment variable.
    >
    > Thanks
    >
    >
    > ------------------------------
    > SANKET RATHI
    > ------------------------------
    >
    >
    > Reply to Sender : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6211&MID=353798&SenderKey=ec5c515a-1ff7-44b0-a989-07ce0f729269
    >
    > Reply to Discussion : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6211&MID=353798
    >
    >
    >
    > You are subscribed to "AIX Open Source" as Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=af5415f8-d8d8-4ac4-b3cb-08a8da184054.


    ------------------------------------------------------------------
    Russell Adams Russell.Adams@AdamsSystems.nl
    Principal Consultant Adams Systems Consultancy
    https://adamssystems.nl/




  • 18.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Mon January 30, 2023 05:24 AM
    I tend to agree with you on AIX Toolbox not being ideal for a production environment. The fact that we have it, is also a legacy from our previous parent company. Our AIX servers are not connected to the internet though, we are using a local yum repository.

    I did try updating /etc/environment as well, but HPSA is not getting its $PATH from there it seems...

    ------------------------------
    Maarten Van der Auwera
    ------------------------------



  • 19.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Mon January 30, 2023 03:24 AM

    > For example, when executing scripts as root with HP Server Automation from Microfocus,
    > the $PATH of the root user isn't loaded and scripts fail to run

    Have you considered running these script the proper way ie via"su - root -c /path/to/script"? Sunning "su" with "-" option should initialize $PATH.



    ------------------------------
    Lech Szychowski
    ------------------------------



  • 20.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Mon January 30, 2023 04:25 AM
    Thanks for the good advice!

    I did already try that though and I'm afraid doing this in HP Server Automation causes other issues...
    This is because remote execution in HP Server Automation doesn't have a terminal and certain commands which set the environment (like "who am i") require a terminal to properly function.

    ------------------------------
    Maarten Van der Auwera
    ------------------------------



  • 21.  RE: Removal of symlink/files from /usr for AIX Toolbox packages

    Posted Mon January 30, 2023 04:37 AM

    > certain commands which set the environment (like "who am i") require a terminal to properly function.
    Such commands should be executed conditionally. Use "tty" command to verify whether there is a controlling terminal (tty -s && command) and make sure login shell initialization scripts run fine without a terminal.



    ------------------------------
    Lech Szychowski
    ------------------------------