Hello community,

here is the log from the commit of package openvpn for openSUSE:Factory checked 
in at 2013-01-29 06:46:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openvpn (Old)
 and      /work/SRC/openSUSE:Factory/.openvpn.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openvpn", Maintainer is "m...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/openvpn/openvpn.changes  2012-12-14 
10:14:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.openvpn.new/openvpn.changes     2013-01-29 
06:46:28.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Jan 28 13:59:07 UTC 2013 - m...@suse.com
+
+- Join openvpn.service systemd cgroup in start when needed, e.g.
+  when starting with further parameters. (bnc#781106)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openvpn.spec ++++++
--- /var/tmp/diff_new_pack.uiOEQt/_old  2013-01-29 06:46:30.000000000 +0100
+++ /var/tmp/diff_new_pack.uiOEQt/_new  2013-01-29 06:46:30.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package openvpn
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed


++++++ openvpn.init ++++++
--- /var/tmp/diff_new_pack.uiOEQt/_old  2013-01-29 06:46:30.000000000 +0100
+++ /var/tmp/diff_new_pack.uiOEQt/_new  2013-01-29 06:46:30.000000000 +0100
@@ -72,6 +72,35 @@
 action="$1" ; shift
 config="$1" ; shift
 
+systemd_cgroup_dir="/sys/fs/cgroup/systemd"
+openvpn_cgroup_dir="${systemd_cgroup_dir}/system/openvpn.service"
+
+join_openvpn_service_cgroup()
+{
+       local pid dummy
+
+       # when the systemd cgroup mountpoint does not exists,
+       # assume we run unter systemv init -> nothing to do.
+       /bin/mountpoint -q "${systemd_cgroup_dir}" || return 0
+
+       # create the openvpn.service cgroup when needed
+       if test ! -d "${openvpn_cgroup_dir}" ; then
+               /bin/mkdir -p "${openvpn_cgroup_dir}" || return 1
+       fi
+
+       # check if the openvpn.service cgroup task list exists
+       if test -f "${openvpn_cgroup_dir}/tasks" ; then
+               # when we're already a member, all is done
+               while read pid dummy ; do
+                       test "$pid" = "$$" && return 0
+               done < "${openvpn_cgroup_dir}/tasks"
+
+               # otherwise join the openvpn.service cgroup
+               echo "$$" > "${openvpn_cgroup_dir}/tasks" && return 0
+       fi
+       return 1
+}
+
 autostart_filter()
 {
        test "x$config" != "x"           && return 0
@@ -84,6 +113,8 @@
 
 case "$action" in
     start)
+       join_openvpn_service_cgroup
+
        /sbin/modprobe tun &>/dev/null
 
        name=""

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to