Changeset 29067


Ignore:
Timestamp:
2011-11-13T23:16:02+01:00 (6 years ago)
Author:
nico
Message:

packages/subversion: use new service functions

Location:
packages/net/subversion
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/subversion/Makefile

    r28765 r29067  
    1010PKG_NAME:=subversion 
    1111PKG_VERSION:=1.6.17 
    12 PKG_RELEASE:=2 
     12PKG_RELEASE:=3 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
  • packages/net/subversion/files/subversion.init

    r17211 r29067  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
     3 
    34START=50 
    45 
    5 start_service () { 
     6start_instance () { 
    67        local section="$1" 
    7         config_get path "$section" path 
    8         config_get port "$section" port 
     8        config_get path "$section" 'path' 
     9        config_get port "$section" 'port' 
    910 
    1011        if [ ! -d "$path" ]; then 
     
    1718                echo 
    1819                echo "Changing the path using UCI (default path is: /var/local/svn):" 
    19                 echo "        uci set subversion.cfg1.path="/srv/svn"" 
     20                echo "        uci set subversion.@[0].path="/srv/svn"" 
    2021                echo "        uci commit" 
    2122                echo "        /etc/init.d/subversion restart" 
    22                 exit 1 
     23                return 1 
    2324        fi 
    2425 
    25         svnserve -d --listen-port ${port} -r ${path} 
     26        service_start /usr/bin/svnserve -d --listen-port ${port} -r ${path} 
    2627} 
    2728 
    2829start() { 
    29         config_load "subversion" 
    30         config_foreach start_service subversion 
     30        config_load 'subversion' 
     31        config_foreach start_instance 'subversion' 
    3132} 
    3233 
    3334stop() { 
    34         killall -9 svnserve 
     35        SERVICE_SIG_STOP="INT" \ 
     36        service_stop /usr/bin/svnserve 
    3537} 
Note: See TracChangeset for help on using the changeset viewer.