Having Git on NAS server comes in handy and I was quite annoyed when my workaround that worked on NAS4Free 11.1 stopped working with the advent of XigmaNAS 11.2. Well, I guess it was time to make some adjustments.
I won’t get into how the whole process works as I already explained it previously. Suffice to say it stopped working on 11.2 due to even tighter disk space restrictions it brought. While originally I just didn’t have space to install software, this time there wasn’t enough space to even get needed packages.
So I adjusted my unionfs creation process to include two extra directories (/var/db/pkg/
and /var/cache/pkg/
):
rm -rf /mnt/.unionfs/* |& sed '/^$/d' |& sed -e 's/^/ /'
for LOCATION in "usr/local" "var/db/pkg" "var/cache/pkg"
do
if mount -t unionfs | grep "/mnt/.unionfs/$LOCATION" >/dev/null
then
echo -en "${ESCAPE_OUTPUT}"
mount -t unionfs |& grep "/mnt/.unionfs/$LOCATION" | sed -e 's/^/ /'
echo -en "${ESCAPE_RESET}"
else
echo -en "${ESCAPE_ISSUE}"
mkdir -p "/mnt/.unionfs/$LOCATION/" |& sed '/^$/d' |& sed -e 's/^/ /'
mkdir -p "/$LOCATION/"
mount_unionfs "/mnt/.unionfs/$LOCATION/" "/$LOCATION/" |& sed '/^$/d' |& sed -e 's/^/ /'
echo -en "${ESCAPE_RESET}"
echo -en "${ESCAPE_OUTPUT}"
mount -t unionfs |& grep "/mnt/.unionfs/$LOCATION" | sed -e 's/^/ /'
echo -en "${ESCAPE_RESET}"
fi
done
Adjusting initialization script with this allowed me to install Git once again.