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

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