Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't grok which on EL9 #44

Open
vwbusguy opened this issue Jun 22, 2022 · 2 comments
Open

Can't grok which on EL9 #44

vwbusguy opened this issue Jun 22, 2022 · 2 comments

Comments

@vwbusguy
Copy link

fstransform resolves which to the alias output (which which) instead of it's actual filesystem location (/usr/bin/which) and fails to run.

Overriding this path in the fstransform startup script fixes the problem. Setting --cmd-which=/usr/bin/which, as per the error output, did not have an effect.

# fstransform  /dev/vdb1 ext4                                                                           [1755/1810]
fstransform: starting version 0.9.4, checking environment
fstransform: checking for which...         found 'which ()
{ 
    ( alias;
    eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}', but is NOT executable by you!
fstransform: checking for expr...         '/bin/expr'
fstransform: checking for id...         '/bin/id'

ERROR! fstransform: environment check failed.
       Please install the commands 'which' before running fstransform
       If these commands are already installed, add them to your $PATH
       or tell their location with the option --cmd-COMMAND=/path/to/your/command

# which which
which ()
{ 
    ( alias;
    eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}
@cosmos72
Copy link
Owner

Does unset -f which help?

@vwbusguy
Copy link
Author

It appears to. which which then resolves to /bin/which. The workaround I did was to hack /usr/local/sbin/fstransform and set

BOOT_CMD_which=/usr/bin/which

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants