#!/bin/sh /etc/rc.common# Copyright (C) 2006-2016 OpenWrt.orgSTART=50start_instance(){localsection="$1"config_getpath"$section"'path'config_getport"$section"'port'if[!-d"$path"];thenecho"The subversion repository (${path}) does not exist."echo"Create a new repository and/or change the path in /etc/config/subversion"echoecho"Create a new subversion repository with:"echo" mkdir -p ${path}"echo" svnadmin create --fs-type fsfs ${path}"echoecho"Changing the path using UCI (default path is: /var/local/svn):"echo" uci set subversion.@[0].path="/srv/svn""echo" uci commit"echo" /etc/init.d/subversion restart"return1fiservice_start/usr/bin/svnserve-d--listen-port${port}-r${path}}start(){config_load'subversion'config_foreachstart_instance'subversion'}stop(){SERVICE_SIG_STOP="INT"\
service_stop/usr/bin/svnserve}