Antynea / grub-btrfs

Include btrfs snapshots at boot options. (Grub menu)
GNU General Public License v3.0
745 stars 77 forks source link

Update grub-btrfsd #243

Closed pavinjosdev closed 1 year ago

pavinjosdev commented 1 year ago

Fixed shebang. Script was failing to detect inotify on Debian bullseye with sh.

Schievel1 commented 1 year ago

I actually left this as sh-shebang because I read somewhere that daemons for openrc should be plain sh and not bash. (but I can't find that source right now).

I have the problem that on my system sh-scripts are just executed by bash, as /bin/sh is just a symlink to /bin/bash. Therefore I rely on bash-ls to tell me if I do something that is not available on sh. (Like [[) Looks like it failed me here.

Could you help me out with this? I guess the command-command is not working. Maybe we can find a sh-compliant way to detect inotify.

Schievel1 commented 1 year ago

That suggestion thing did not go as planned...

So, could you change that back to !#/bin/sh and change the line 161 to

 if ! command -v inotifywait >/dev/null 2>&1; then

and give that a try?

Also the output of

ls -l /bin | grep sh

would be great. Just to see what shell you are actually running.

pavinjosdev commented 1 year ago

Thanks, I made the change and it works. sh points to dash on my system (Linux Mint Debian Edition, Debian 11.2)

Schievel1 commented 1 year ago

Thanks, I will install dash then to test things out in the future. Because neither bash-ls nor set -o posix catched that redirect

I will Squash and merge this when I am on a PC. I am on cellphone right now

Schievel1 commented 1 year ago

I squash merged this with magit forge, so apparently that does not go very well with github sometimes.

Anyway, consider that merged, thanks for your work.