diff options
Diffstat (limited to 'libexec')
-rwxr-xr-x | libexec/container/key | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libexec/container/key b/libexec/container/key index 5f76fb2..679e636 100755 --- a/libexec/container/key +++ b/libexec/container/key @@ -87,6 +87,15 @@ then Usage fi +if [ ! -w "${KEYS}" ] +then + if [ "$(id -u)" -ne 0 ] + then + echo "'${COMMAND}': need root privileges (or write permissions to '${KEYS}')" >&2 + exit 1 + fi +fi + # Pre hooks for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}" do |