##### /etc/config/subversion: config subversion option path /srv/subversion option port 3690 ##### /etc/init.d/subversion: #!/bin/sh /etc/rc.common # Copyright (C) 2006 OpenWrt.org START=50 start_service () { local section="$1" config_get path "$section" path config_get port "$section" port if [ ! -d "$path" ]; then echo "The subversion repository (${svn_repo_path}) does not exist." echo "Create a new repository and/or change svn_repo_path in /etc/config/subversion" echo echo "Create a new subversion repository with:" echo " mkdir -p /var/local" echo " svnadmin create --fs-type fsfs /var/local/svn/" echo echo "Changing the svn_repo_path with (default path is: /var/local/svn):" echo " uci set subversion.config.SVN_REPO_PATH="/var/local/svn"" echo " uci commit" exit 1 fi svnserve -d --listen-port ${port} -r ${path} } start() { config_load "subversion" config_foreach run_service subversion } stop() { killall -9 svnserve }