Re: Linux Without shell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 18, 2004 at 18:10:06 +0530, Ketan Mukadam wrote:
> Is it possible to remove the shell and insert my own program?

Shell? The shell is almost never called by this code!
Since execve is a noreturn call, only the first successful one actualy
happens. You can set execute_command with init=<whatever> argument to
kernel.

> In the file linux/init/main.c (line 598), is it possible to replace the 
> following code
> 
> if (execute_command)
>        execve(execute_command,argv_init,envp_init);
>        execve("/sbin/init",argv_init,envp_init);
>    execve("/etc/init",argv_init,envp_init);
>    execve("/bin/init",argv_init,envp_init);
>    execve("/bin/sh",argv_init,envp_init);
> 
> with one of my own program??
> 
> Thanks in advance
> 
> Ketan
> 
> -- 
> "Whenever I climb I am followed by a dog called 'Ego'."
> - Friedrich Nietzsche (1844-1900)
> 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux