Sfoglia il codice sorgente

Fixed minor issue with cables daemon initialization

In order to remove stale rqueue/*.new directories, cabled init service
invokes "/usr/libexec/cable/cabled init" via sudo. However, due to a bug
in sudo, the full group vector is not set:
    http://www.gratisoft.us/bugzilla/show_bug.cgi?id=516
This prevented cabled from having access to the relevant directories.
The issue is now fixed by explicitly specifying the legion group.
Maxim Kammerer 14 anni fa
parent
commit
6956b72597
2 ha cambiato i file con 20 aggiunte e 1 eliminazioni
  1. 19 0
      src/root/patches/cabled.patch
  2. 1 1
      src/root/setup

+ 19 - 0
src/root/patches/cabled.patch

@@ -0,0 +1,19 @@
+--- /etc/init.d/cabled	2011-10-08 04:18:11.000000000 +0000
++++ /etc/init.d/cabled.new	2011-10-10 20:24:57.000000000 +0000
+@@ -2,6 +2,7 @@
+ 
+ description="Starts cables communication daemon."
+ 
++lgroup=legion
+ cuser=cable
+ cableflag=/var/www/cable
+ 
+@@ -18,7 +19,7 @@
+         # service_stopped doesn't work, since nginx is "starting"
+         if ! service_started nginx; then
+             ebegin "Initializing cabled"
+-            sudo -n -u ${cuser} ${daemon} init
++            sudo -n -u ${cuser} -g ${lgroup} ${daemon} init
+             eend $?
+         else
+             ewarn "Skipping cabled init (nginx not inactive)"

+ 1 - 1
src/root/setup

@@ -423,7 +423,7 @@ sed "s@VERSION@${VERSION}@" ${HOME}/config/issue > /etc/issue
 
 
 sinfo "Patching init scripts"
-initpatches="inittab kexec iptables"
+initpatches="inittab kexec iptables cabled"
 for p in ${initpatches}; do
     spatch ${HOME}/patches/${p}.patch -p0
 done