linux-um archives
 help / color / mirror / Atom feed
From: Mattia Dongili <malattia@linux.it>
To: UML-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
Date: Sun, 2 Apr 2006 19:34:46 +0200	[thread overview]
Message-ID: <20060402173445.GB5108@inferi.kami.home> (raw)

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

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 <malattia@linux.it>
-- 
mattia
:wq!

[-- Attachment #2: 01_uml_net.diff --]
[-- Type: text/plain, Size: 656 bytes --]

--- 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	other threads:[~2006-04-02 17:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02 17:34 Mattia Dongili [this message]
2006-04-02 18:29 ` [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH Geert Uytterhoeven
2006-04-02 19:54   ` Mattia Dongili
2006-04-04  0:39     ` Blaisorblade
2006-04-05 21:11       ` Mattia Dongili
2006-04-07  6:45         ` Blaisorblade
2006-04-07 16:52           ` Mattia Dongili
2006-04-09 12:52             ` Stefano Melchior
2006-04-19  9:52               ` Blaisorblade
2006-04-19 19:07                 ` Mattia Dongili
2006-04-21 18:34                   ` Blaisorblade
2006-04-21 21:18             ` Blaisorblade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060402173445.GB5108@inferi.kami.home \
    --to=malattia@linux.it \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox