Fixed hook running in chroot

This commit is contained in:
Sohrab Behdani 2025-02-10 20:01:18 +03:30
parent e3374d38af
commit c67ca7f88d

View file

@ -1,4 +1,8 @@
#!/usr/bin/env bash
if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then
echo "Skipping hook execution in chroot."
exit 0
fi
while read -r line; do
version=$(basename "${line%/vmlinuz}")