diff --git a/easyinstall.sh b/easyinstall.sh index e1177ce5..2f23d574 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -153,8 +153,11 @@ function installPackagesWeb() { $APT_PACKAGES_PYTHON \ $APT_PACKAGES_WEB - if ! sudo apt-get install --no-install-recommends --assume-yes -qq hfsutils; then - echo "WARNING: Failed to install 'hfsutils'. HFS disk image support may be unavailable." + if ! command -v hformat >/dev/null 2>&1 ]; then + if ! sudo apt-get install --no-install-recommends --assume-yes -qq hfsutils; then + echo "hfsutils package not found in apt repositories; compiling from source..." + installHfsutils + fi fi } @@ -439,6 +442,24 @@ function installHfdisk() { fi } +# Clone, compile and install 'hfsutils', HFS disk image tools +function installHfsutils() { + sudo apt-get install --no-install-recommends --assume-yes -qq autoconf automake libtool m4 /dev/null + } | sudo tee -a "$AFPCONF" > /dev/null echo "Added share section for $AFP_SHARE_NAME to afp.conf" else echo "Share section [$AFP_SHARE_NAME] already exists; not updating afp.conf" fi fi + if [[ "$ADDITIONAL_SHARE_NAME" && "$ADDITIONAL_SHARE_PATH" ]]; then + if ! grep -q "^\[$ADDITIONAL_SHARE_NAME\]" "$AFPCONF"; then + { + echo + echo "[$ADDITIONAL_SHARE_NAME]" + echo "path = $ADDITIONAL_SHARE_PATH" + echo "volume name = $ADDITIONAL_SHARE_NAME" + } | sudo tee -a "$AFPCONF" > /dev/null + echo "Added share section for $ADDITIONAL_SHARE_NAME to afp.conf" + else + echo "Share section [$ADDITIONAL_SHARE_NAME] already exists; not updating afp.conf" + fi + fi + if [[ "$APPLETALK_INTERFACE" ]]; then echo "$NETATALK_CONFDIR/atalkd.conf:" echo "$APPLETALK_INTERFACE" | sudo tee -a "$NETATALK_CONFDIR/atalkd.conf"