#!/bin/sh cat << EOF # create required directories (cache-dir, conf-dir). mkdir -p /var/davfs2 2>/dev/null mkdir -p $DAVFS2_TMPPATH 2>/dev/null mkdir -p /var/cache 2>/dev/null rm /var/cache/davfs2 2>/dev/null ln -s $DAVFS2_TMPPATH /var/cache/davfs2 # create davfs2.conf # echo "secrets /var/davfs2/secrets" > /var/davfs2/davfs2.conf # chmod 0600 /var/davfs2/secrets modprobe coda if [ "$DAVFS2_MOUNTPOINT1" != "" ]; then echo "secrets /var/davfs2/secrets_1" > /var/davfs2/davfs2_1.conf if [ "$DAVFS2_SERVERCERT1" == "yes" ]; then echo "servercert /var/tmp/flash/davfs_servercrt1.pem" >> /var/davfs2/davfs2_1.conf fi echo "ask_auth 0" >> /var/davfs2/davfs2_1.conf chmod 0600 /var/davfs2/secrets_1 echo "mount $DAVFS2_HOST1..." mkdir -p $DAVFS2_MOUNTPOINT1 2>/dev/null mount.davfs $DAVFS2_HOST1 $DAVFS2_MOUNTPOINT1 -o conf=/var/davfs2/davfs2_1.conf fi if [ "$DAVFS2_MOUNTPOINT2" != "" ]; then echo "secrets /var/davfs2/secrets_2" > /var/davfs2/davfs2_2.conf if [ "$DAVFS2_SERVERCERT2" == "yes" ]; then echo "servercert /var/tmp/flash/davfs_servercrt2.pem" >> /var/davfs2/davfs2_2.conf fi echo "ask_auth 0" >> /var/davfs2/davfs2_2.conf chmod 0600 /var/davfs2/secrets_2 echo "mount $DAVFS2_HOST2..." mkdir -p $DAVFS2_MOUNTPOINT2 2>/dev/null mount.davfs $DAVFS2_HOST2 $DAVFS2_MOUNTPOINT2 -o conf=/var/davfs2/davfs2_2.conf fi if [ "$DAVFS2_MOUNTPOINT3" != "" ]; then echo "secrets /var/davfs2/secrets_3" > /var/davfs2/davfs2_3.conf if [ "$DAVFS2_SERVERCERT3" == "yes" ]; then echo "servercert /var/tmp/flash/davfs_servercrt3.pem" >> /var/davfs2/davfs2_3.conf fi echo "ask_auth 0" >> /var/davfs2/davfs2_3.conf chmod 0600 /var/davfs2/secrets_3 echo "mount $DAVFS2_HOST3..." mkdir -p $DAVFS2_MOUNTPOINT3 2>/dev/null mount.davfs $DAVFS2_HOST3 $DAVFS2_MOUNTPOINT3 -o conf=/var/davfs2/davfs2_3.conf fi EOF