summaryrefslogtreecommitdiff
path: root/create-hook
blob: 164e4fba2681c2a94c6422a3c79b5f4eca52ccb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

input='/usr/share/libalpm/hooks/90-linux.hook'
sed '
  /Target = boot\//d
  /Description =/{
    s/=\s*/= Test permissions for /
    a When = PreTransaction\
Exec = /usr/bin/sh -c '"'"'[ -w /boot ]'"'"'\
AbortOnFail
    q
  }
' "${input}"