[Pkg-sysvinit-commits] r464 - in sysvinit/trunk/debian: . patches

Thomas Hood jdthood-guest at costa.debian.org
Sat Dec 31 10:01:33 UTC 2005


Author: jdthood-guest
Date: 2005-12-31 10:01:32 +0000 (Sat, 31 Dec 2005)
New Revision: 464

Added:
   sysvinit/trunk/debian/patches/64_init_set_PATH.dpatch
Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/patches/00list
Log:
init: Set PATH if unset on reload

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2005-12-30 10:31:17 UTC (rev 463)
+++ sysvinit/trunk/debian/changelog	2005-12-31 10:01:32 UTC (rev 464)
@@ -6,6 +6,8 @@
   * umountfs: Only run umount if there is something to unmount
     (Closes: #345272)
   * urandom: Add PATH so that find can be found  (Closes: #345273)
+  * init: 64_init_set_PATH: Set PATH if unset on reload
+    (Closes: #345370)
 
   [ Petter Reinholdtsen ]
   * sysv-rc: Fix some typos in the startpar handling.  (Closes: #345269)

Modified: sysvinit/trunk/debian/patches/00list
===================================================================
--- sysvinit/trunk/debian/patches/00list	2005-12-30 10:31:17 UTC (rev 463)
+++ sysvinit/trunk/debian/patches/00list	2005-12-31 10:01:32 UTC (rev 464)
@@ -16,6 +16,7 @@
 61_init_msg
 62_init_freebsdterm
 63_init_longer_procname
+64_init_set_PATH
 70_wall_ttyname
 71_wall_hostname
 80_killall_sched

Added: sysvinit/trunk/debian/patches/64_init_set_PATH.dpatch
===================================================================
--- sysvinit/trunk/debian/patches/64_init_set_PATH.dpatch	2005-12-30 10:31:17 UTC (rev 463)
+++ sysvinit/trunk/debian/patches/64_init_set_PATH.dpatch	2005-12-31 10:01:32 UTC (rev 464)
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 64_init_set_PATH.dpatch by Thomas Hood
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Set PATH to default if unset on reload
+
+ at DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./src/init.c /tmp/dpep-work.2oIDao/trunk/src/init.c
+--- dummy/dummy/init.c_ORIG	2005-12-31 11:51:03.000000000 +0100
++++ dummy/dummy/init.c	2005-12-31 11:58:48.000000000 +0100
+@@ -2573,7 +2573,7 @@
+   	/*
+ 	 *	Set default PATH variable.
+ 	 */
+-  	putenv(PATH_DFL);
++  	setenv("PATH", PATH_DEFAULT, 1 /* Overwrite */);
+ 
+   	/*
+ 	 *	Initialize /var/run/utmp (only works if /var is on
+@@ -2612,6 +2612,11 @@
+ 	initlog(L_CO, bootmsg, "reloading");
+ 	sigfillset(&sgt);
+ 	sigprocmask(SIG_UNBLOCK, &sgt, NULL);
++
++  	/*
++	 *	Set default PATH variable.
++	 */
++  	setenv("PATH", PATH_DEFAULT, 0 /* Don't overwrite */);
+   }
+   start_if_needed();
+ 
+diff -urNad --exclude=CVS --exclude=.svn ./src/init.h /tmp/dpep-work.2oIDao/trunk/src/init.h
+--- ./src/init.h	2005-12-02 17:22:57.000000000 +0100
++++ /tmp/dpep-work.2oIDao/trunk/src/init.h	2005-12-31 11:56:18.000000000 +0100
+@@ -24,7 +24,7 @@
+ #define SLEEPTIME  300			/* Disable time */
+ 
+ /* Default path inherited by every child. */
+-#define PATH_DFL   "PATH=/bin:/usr/bin:/sbin:/usr/sbin"
++#define PATH_DEFAULT   "/bin:/usr/bin:/sbin:/usr/sbin"
+ 
+ 
+ /* Prototypes. */


Property changes on: sysvinit/trunk/debian/patches/64_init_set_PATH.dpatch
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-sysvinit-commits mailing list