packages/scanlogd: change chroot to /var/run/scanlogd, use new service functions, create scanlogd user and group at start
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28967 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5307723017
commit
01f5f5421c
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2006-2009 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=scanlogd
|
PKG_NAME:=scanlogd
|
||||||
PKG_VERSION:=2.2.6
|
PKG_VERSION:=2.2.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.openwall.com/scanlogd/ \
|
PKG_SOURCE_URL:=http://www.openwall.com/scanlogd/ \
|
||||||
@ -38,8 +38,9 @@ define Package/scanlogd/description
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
$(SED) "s,/var/empty,/tmp/.scanlogd," $(PKG_BUILD_DIR)/params.h
|
$(SED) 's,^#define \(SCANLOGD_CHROOT\).*,#define \1 "/var/run/scanlogd",' \
|
||||||
$(SED) "s,#undef SCANLOGD_DEVICE,#define SCANLOGD_DEVICE \"all\"," $(PKG_BUILD_DIR)/params.h
|
-e 's,^#undef \(SCANLOGD_DEVICE\),#define \1 "all",' \
|
||||||
|
$(PKG_BUILD_DIR)/params.h
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
START=50
|
START=50
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
mkdir -p `grep "^scanlogd:" /etc/passwd | cut -d: -f6`
|
user_exists scanlogd 51 || user_add scanlogd 51
|
||||||
/usr/sbin/scanlogd
|
group_exists scanlogd 51 || group_add scanlogd
|
||||||
|
[ -d /var/run/scanlogd ] || {
|
||||||
|
mkdir -m 0755 -p /var/run/scanlogd
|
||||||
|
chmod 0755 /var/run/scanlogd
|
||||||
|
chown scanlogd:scanlogd /var/run/scanlogd
|
||||||
|
}
|
||||||
|
service_start /usr/sbin/scanlogd
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
killall scanlogd
|
service_stop /usr/sbin/scanlogd
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user