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

profilealert fixes #17

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

r00t-
Copy link

@r00t- r00t- commented Jul 31, 2019

i installed chkboot (from debian unstable), and found a few issues with the profilealert script:

  • it uses source, which is not available in all shells, and will cause errors
    (just set your login-shell to dash instead of bash and see yourself)
  • using #!/bin/bash does NOT help, as profile scripts are sourced into whatever shell the user is using
  • actually, source-ing the defaults will will load all it's settings into every shell on the system,
    just try echo $BOOTDISK after login

no need for a shebang or chmod +x
ie. `/bin/dash` or 'busybox sh' do not have `source`.
(the bash shebang we had before does NOT help, as this script itself is sourced into a running shell, not executed)
as sourcing it in profile.d will pollute the user's environment with all it's settings
as the return value of the profile.d entries is ignored
@lyknode
Copy link
Contributor

lyknode commented Sep 11, 2019

FYI, I've tested and integrated this patch in the Debian package.

@r00t-, You need to update Makefile and README.md to reflect your changes to the profile file's mode. (Both still references 755).

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

Successfully merging this pull request may close these issues.

2 participants