mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2025-01-24 07:28:25 +00:00
use head directly without cat in post-hooks
less is more...
This commit is contained in:
parent
fa44f46eba
commit
101b89f0be
2
tomb
2
tomb
@ -1956,7 +1956,7 @@ exec_safe_post_hooks() {
|
|||||||
[[ -x $mnt/post-hooks ]] || return
|
[[ -x $mnt/post-hooks ]] || return
|
||||||
|
|
||||||
# If the file starts with a shebang, run it.
|
# If the file starts with a shebang, run it.
|
||||||
cat $mnt/post-hooks | head -n1 | grep '^#!\s*/' &> /dev/null
|
head -n1 $mnt/post-hooks | grep '^#!\s*/'
|
||||||
[[ $? == 0 ]] && {
|
[[ $? == 0 ]] && {
|
||||||
_success "Post hooks found, executing as user ::1 user name::." $USERNAME
|
_success "Post hooks found, executing as user ::1 user name::." $USERNAME
|
||||||
$mnt/post-hooks $act $mnt
|
$mnt/post-hooks $act $mnt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user