Create Anvil directories during bootstrap

Create /usr/share/anvil and /etc/anvil. Change their
ownership to user running sudo if sudo is used.

These directories will be used immediately on prepare.

Change-Id: I2ef4b5246b0d73ee01268f73ba24789f4e5b10e8
Fixes: bug #1186438
This commit is contained in:
Alessio Ababilov 2013-06-01 05:25:00 +04:00 committed by Joshua Harlow
parent dda4feab82
commit 3a4b303a69

6
smithy
View File

@ -282,5 +282,11 @@ checksum=$(get_checksums)
for i in $BOOT_FILES; do
echo -e $checksum > $i
done
mkdir -pv /etc/anvil /usr/share/anvil
if [ -n "$SUDO_UID" -a -n "SUDO_GID" ]; then
chown -c "$SUDO_UID:$SUDO_GID" /etc/anvil /usr/share/anvil
fi
echo "Success! Bootstrapped for $SHORTNAME $RELEASE"
exit 0