[packages] transmission: cleanup and drop some bashizm
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29006 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
95318172f7
commit
b00c751d1e
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=transmission
|
PKG_NAME:=transmission
|
||||||
PKG_VERSION:=2.42
|
PKG_VERSION:=2.42
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://mirrors.m0k.org/transmission/files
|
PKG_SOURCE_URL:=http://mirrors.m0k.org/transmission/files
|
||||||
|
@ -37,11 +37,10 @@ append_params_quotes() {
|
|||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
local s="$1"
|
local s="$1"
|
||||||
local enable=0
|
|
||||||
local enabled=0
|
local enabled=0
|
||||||
local run_as_usr='root'
|
local run_as_usr='root'
|
||||||
local open_file_limit=0
|
local open_file_limit=0
|
||||||
local ulimit_files=`ulimit -n`
|
local ulimit_files=$(ulimit -n)
|
||||||
|
|
||||||
# disabled?
|
# disabled?
|
||||||
config_get_bool enabled "$s" enabled 0
|
config_get_bool enabled "$s" enabled 0
|
||||||
@ -81,7 +80,7 @@ start_service() {
|
|||||||
chown -R $run_as_usr $config_dir
|
chown -R $run_as_usr $config_dir
|
||||||
|
|
||||||
config_get open_file_limit "$s" open_file_limit 32
|
config_get open_file_limit "$s" open_file_limit 32
|
||||||
let open_limit_files="$open_file_limit + 8"
|
open_limit_files=$(($open_file_limit + 8))
|
||||||
|
|
||||||
if [ ${open_file_limit} -gt ${ulimit_files} ]; then
|
if [ ${open_file_limit} -gt ${ulimit_files} ]; then
|
||||||
ulimit -n $open_limit_files
|
ulimit -n $open_limit_files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user