[openbeosnetteam] Re: load_image() from kernel land (Was: PPP homepage)
- From: "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx>
- To: <openbeosnetteam@xxxxxxxxxxxxx>
- Date: Tue, 27 Apr 2004 08:52:33 +0200
> Well, some erratum:
>
> - BeOS bash don't support -l but only --login
> - Setting up environment can be done by wrapping the app in a small
> script looking like that:
>
> /boot/beos/etc/network/profiles/current/dun_login :
>
> #!/bin/sh
>
> # this must be done here because SetupEnvironment depends on it
> #
> SAFEMODE=`/bin/safemode`
> export SAFEMODE
>
> #
> # load up some useful environment variables...
> #
> if [ -f "/boot/beos/system/boot/SetupEnvironment" ]
> then
> . /boot/beos/system/boot/SetupEnvironment
> fi
>
> /boot/beos/apps/Terminal
>
> It give us a fully setup environment in the Terminal session.
> The driver code still looks simple:
>
> char * argv[] = { "/boot/beos/etc/network/profiles/current/dun_login",
> NULL };
> resume_thread(load_image(1, argv, NULL));
>
> If we want to pass an user-specified app to run every time a PPP
> interface needs user interaction, it's easy to modify this script to
> test and then run the first argument passed...
Wow, the kernel knows how to execute scripts (by calling sh)? I thought I must
run sh with the script name as its argument.
Did you test if it really works by specifying a script instead of an ELF image
as the executing app (argv[0]) to load_image()?
Bye,
Waldemar
- Follow-Ups:
- [openbeosnetteam] Re: load_image() from kernel land (Was: PPPhomepage)
- From: Philippe Houdoin
- References:
- [openbeosnetteam] load_image() from kernel land (Was: PPP homepage)
- From: Philippe Houdoin
Other related posts:
- » [openbeosnetteam] load_image() from kernel land (Was: PPP homepage)
- » [openbeosnetteam] Re: load_image() from kernel land (Was: PPP homepage)
- » [openbeosnetteam] Re: load_image() from kernel land (Was: PPP homepage)
- » [openbeosnetteam] Re: load_image() from kernel land (Was: PPP homepage)
- [openbeosnetteam] Re: load_image() from kernel land (Was: PPPhomepage)
- From: Philippe Houdoin
- [openbeosnetteam] load_image() from kernel land (Was: PPP homepage)
- From: Philippe Houdoin