This file is indexed.

/usr/lib/python2.7/dist-packages/charmtools/templates/chef/files/hooks/stub is in charm-tools 2.1.2-0ubuntu4.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#!/bin/bash
set -e

HOOK_NAME=\$(basename \$0)
CHARM_NAME=$metadata.package

if [[ "\$HOOK_NAME" == *-relation-* ]]; then
  COOKBOOK_NAME="\${HOOK_NAME%-relation*}-relation"
  RECIPE_NAME=\${HOOK_NAME\#*relation-}
else
  COOKBOOK_NAME=\$CHARM_NAME
  RECIPE_NAME=\$HOOK_NAME
fi

cd "\$(dirname \$0)" && bundle exec chef-solo -o "recipe[\$COOKBOOK_NAME::\$RECIPE_NAME]"