From 27f23a3a83c0d33ef062bade0a30e8d31a98c9e8 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Tue, 15 Nov 2011 01:53:51 +0000 Subject: [PATCH] [backfire] packages/sudo: merge r29143 (closes: #10289) SVN-Revision: 29144 --- admin/sudo/Makefile | 17 ++++++++++++++--- admin/sudo/files/sudo.init | 11 +++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100755 admin/sudo/files/sudo.init diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile index b5038afb5c..9e9aa1a97a 100644 --- a/admin/sudo/Makefile +++ b/admin/sudo/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sudo -PKG_VERSION:=1.7.4p4 +PKG_VERSION:=1.7.8p1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist -PKG_MD5SUM:=55d9906535d70a1de347cd3d3550ee87 +PKG_MD5SUM:=5552b9aabc43e34bbc8dc557c098a933 PKG_INSTALL:=1 @@ -60,6 +60,17 @@ define Package/sudo/install $(INSTALL_DIR) $(1)/etc/sudoers.d $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo_noexec.so $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo +endef + +define Package/sudo/postinst +#!/bin/sh + +[ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/sudo enable + /etc/init.d/sudo start +} endef $(eval $(call BuildPackage,sudo)) diff --git a/admin/sudo/files/sudo.init b/admin/sudo/files/sudo.init new file mode 100755 index 0000000000..9df2737504 --- /dev/null +++ b/admin/sudo/files/sudo.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org + +START=99 + +start() { + [ -d /var/lib/sudo ] || { + mkdir -m 0755 -p /var/lib/sudo + chmod 0700 /var/lib/sudo + } +} -- 2.30.2