Hello,

some time ago it's been proposed to let uml_net live in /usr/lib/uml to
comply the FHS (I have version 2.3 at hand):

  /usr/lib includes object files, libraries, and internal binaries that
  are not intended to be executed directly by users or shell scripts.

see chapter 4.7.1
The attached patch implements it and keeps backward compatibility.
It's kind of brutal because putenv will wipe any user-defined PATH, if
this is a problem I can provide an improved patch that appends
/usr/lib/uml to the existing PATH. Is this the way to go?

Signed-off-by: Mattia Dongili <[EMAIL PROTECTED]>
-- 
mattia
:wq!
--- a/arch/um/os-Linux/helper.c 2006-04-02 16:32:38.340801686 +0200
+++ b/arch/um/os-Linux/helper.c 2006-04-02 16:34:13.454745936 +0200
@@ -22,6 +22,9 @@ struct helper_data {
        int fd;
 };
 
+/* PATH variable to find uml helpers  installed in FHS compliant locations */
+static char *alt_path = "PATH=:/bin:/usr/bin:/usr/lib/uml"; 
+
 /* Debugging aid, changed only from gdb */
 int helper_pause = 0;
 
@@ -41,6 +44,7 @@ static int helper_child(void *arg)
        }
        if(data->pre_exec != NULL)
                (*data->pre_exec)(data->pre_data);
+       putenv(alt_path);
        execvp(argv[0], argv);
        errval = errno;
        printk("execvp of '%s' failed - errno = %d\n", argv[0], errno);

Reply via email to