IBM / ibmichroot

A set of scripts to facilitate the use of chroot-based containers for IBM i
MIT License
21 stars 9 forks source link

chroot: symlink for /bin/sh can't point to /QSYS.LIB/QSHELL.LIB/QZSHSH.PGM #3

Closed abmusse closed 9 years ago

abmusse commented 9 years ago

Original report by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).


Symlink for /bin/sh can't point to /QSYS.LIB/QSHELL.LIB/QZSHSH.PGM because QSYS.LIB lives outside of all chroot environments and shouldn't be created within a chroot, as I understand it.

This means the shebang line (i.e. #!/bin/sh) needs to change in the scripts so they can work within a chroot environment (i.e. pkg_setup.sh), though I wanted to run that past @rangercairns first to make sure I wasn't misunderstanding something or that there wasn't another/better approach.

Recommend using #!/QOpenSys/bin/sh instead.

abmusse commented 9 years ago

Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).


Closing issue.

abmusse commented 9 years ago

Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).


see comment

abmusse commented 9 years ago

Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).


see comment

abmusse commented 9 years ago

Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).


I think irrelevant due to symbolic links after chroot_minimal.lst ...

#!shell

bash-4.3$ chroot /QOpenSys/ranger /bin/bsh
$ ls -l /bin/sh
-rwxr-xr-x    1 adc      0            289320 Jul 24 16:24 /bin/sh
$ ls -l /
total 112
drwxr-sr-x    4 adc      0              8192 Jul 24 16:25 QOpenSys
lrwxrwxrwx    1 adc      0                34 Jul 24 16:25 bin -> /QOpenSys/usr/bin
drwxr-sr-x    3 adc      0              8192 Jul 23 13:52 dev
drwxr-sr-x    2 adc      0              8192 Jul 23 13:52 home
lrwxrwxrwx    1 adc      0                34 Jul 24 16:25 lib -> /QOpenSys/usr/lib
lrwxrwxrwx    1 adc      0                26 Jul 24 16:25 opt -> /QOpenSys/opt
lrwxrwxrwx    1 adc      0                36 Jul 24 16:25 sbin -> /QOpenSys/usr/sbin
drwxr-sr-x    2 adc      0              8192 Jul 23 14:11 tmp
drwxr-sr-x    2 adc      0              8192 Jul 24 16:25 usr
$ /bin/sh
$