aboutsummaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-01-03 13:58:28 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2014-01-10 12:20:18 +0100
commitc9236a3665494fb53f8ab46cdf51007bebde7f3e (patch)
treebb5ad4490be13053e02890d6101594f6387cb9fb /meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch
parent3402bfac6b595c622e4590a8ff5eaaa854e2a2a3 (diff)
downloadmeta-openembedded-contrib-c9236a3665494fb53f8ab46cdf51007bebde7f3e.tar.gz
ajenti: remove
In recent versions, upstream has decided to place additional restrictions on commercial use beyond a standard open source license (LGPLv3) [1]. This makes it hard to set a LICENSE value that is easily understood. Of course, as the authors, they have the right to decide what licensing terms they wish to distribute their project under, and we could always set LICENSE_FLAGS to denote the extra terms, but this is somewhat messy and personally I feel less inclined to continue maintaining this recipe in meta-webserver now, especially since I originally put it together on my own time. At the moment due to a branch/commit mismatch it is no longer fetching in any case. (If someone wants to resurrect this recipe in another layer, they are more than welcome to do so.) [1] http://support.ajenti.org/topic/351265-clarify-licensing/ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch')
-rw-r--r--meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch119
1 files changed, 0 insertions, 119 deletions
diff --git a/meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch b/meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch
deleted file mode 100644
index 651018e5a4..0000000000
--- a/meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 57f949a7ab34812d8384bf41c05c3b25bdade92b Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Sun, 18 Mar 2012 14:26:34 +0000
-Subject: [PATCH] plugins/services: add basic sysvinit implementation
-
-This allows operation on systems that don't have the "service" command.
-The PID finding is a little hacky but mostly works. Note that this uses
-psutil to detect whether the service is really running rather than just
-assuming that it is if the pid file exists.
-
-Note: you need to remove s_upstart.py before this will work.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- plugins/services/s_init.py | 90 ++++++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 90 insertions(+), 0 deletions(-)
- create mode 100755 plugins/services/s_init.py
-
-diff --git a/plugins/services/s_init.py b/plugins/services/s_init.py
-new file mode 100755
-index 0000000..6f38b0a
---- /dev/null
-+++ b/plugins/services/s_init.py
-@@ -0,0 +1,90 @@
-+# Basic sysvinit service backend implementation for Ajenti Services plugin
-+#
-+# Copyright (C) 2012 Intel Corporation
-+# Author: Paul Eggleton <paul.eggleton@linux.intel.com>
-+#
-+
-+import os
-+import psutil
-+
-+from ajenti.com import *
-+from ajenti.utils import *
-+from ajenti import apis
-+from ajenti.api import *
-+
-+def find_service_pid(service):
-+ svcfile = os.path.join('/etc/init.d', service)
-+ pidfile = ''
-+ try:
-+ svcf = open(svcfile)
-+ except:
-+ return None
-+ while 1:
-+ line = svcf.readline()
-+ if not line:
-+ break
-+ if line.startswith('PID='):
-+ pidfile = line.split('=')[1].strip("'\n\r \"")
-+ break
-+ svcf.close()
-+ if not pidfile:
-+ pf = '/var/run/%s.pid' % service
-+ if os.path.exists(pf):
-+ pidfile = pf
-+ else:
-+ pf = '/var/run/%sd.pid' % service
-+ if os.path.exists(pf):
-+ pidfile = pf
-+ if pidfile:
-+ pidf = open(pidfile)
-+ pid = pidf.readline()
-+ pidf.close
-+ if pid:
-+ pid = pid.strip()
-+ pid = int(pid)
-+ try:
-+ p = psutil.Process(pid)
-+ except:
-+ pid = None
-+ return pid
-+ return None
-+
-+
-+class UpstartServiceManager(Plugin):
-+ implements(apis.services.IServiceManager)
-+ platform = ['debian']
-+
-+ def list_all(self):
-+ r = []
-+
-+ blacklist = 'functions mountall.sh save-rtc.sh umountnfs.sh populate-volatile.sh rcS bootlogd urandom halt sendsigs single bootmisc.sh sysfs.sh mountnfs.sh busybox-udhcpc devpts.sh banner.sh modutils.sh checkroot.sh networking umountfs udev rc hostname.sh fbsetup stop-bootlogd rmnologin.sh reboot hwclock.sh read-only-rootfs-hook.sh functions.initscripts syslog.busybox'.split()
-+
-+ for f in os.listdir('/etc/init.d'):
-+ if not f in blacklist:
-+ svc = apis.services.Service()
-+ svc.name = f
-+ pid = find_service_pid(f)
-+ if pid:
-+ svc.status = 'running'
-+ else:
-+ svc.status = 'stopped'
-+ r.append(svc)
-+
-+ return sorted(r, key=lambda s: s.name)
-+
-+ def get_status(self, name):
-+ pid = find_service_pid(name)
-+ if pid:
-+ return 'running'
-+ else:
-+ return 'stopped'
-+
-+ def start(self, name):
-+ shell('/etc/init.d/%s start' % name)
-+
-+ def stop(self, name):
-+ shell('/etc/init.d/%s stop' % name)
-+
-+ def restart(self, name):
-+ shell('/etc/init.d/%s restart' % name)
-+
---
-1.7.5.4
-