Re: running at boot time & signals



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

maria wrote:
> So what I'm doing is creating a Knoppix CD, so users can just turn on
> the computer with the CD in the drive and it'll boot and run the
> program automatically without them having to know anything about Linux
> or do anything else. So waiting for a login and putting it in .profile
> won't really work well.
>
> Running from init, there are some choices a user makes and those work
> fine with menus on stdin/stdout. It's just the signals that are
> getting lost. But the lack of a controlling terminal does make sense.
> Hmm...

Your best bet is to set up the inittab so that one terminal goes
straight to your script as a specific user, rather than presenting the
getty/login process for the terminal

This way,
- - your process gets a controlling terminal,
- - the process doesn't have to run as root, and
- - the user doesn't have to log in
but the user still gets the benefit of a terminal session set up for
your own process.

You will want something like
#c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c1:1235:respawn:/bin/su - username -c /path </dev/tty1 >/dev/tty1 2>&1

where 'username' is the user login name of the user you want the script
to run as, and '/path' is the fully qualified path to the script you
want to run.


- --

Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFD15veagVFX4UWr64RAml7AJ44k1M5y5y1jP5VhUisyPE/UukA6wCfTUZP
qmLlKM5VPTzSQVN0/ylXgvU=
=NF6G
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: logon.bat load map printer scripts
    ... How about wtite commend in login script call map printer vb script. ... I would like to auto run the vbscripts in user login. ...
    (microsoft.public.scripting.vbscript)
  • Re: logon.bat load map printer scripts
    ... How about wtite commend in login script call map printer vb script. ... defaulting to windows directory. ... I would like to auto run the vbscripts in user login. ...
    (microsoft.public.scripting.vbscript)
  • Re: startup script to install drivers from a share?
    ... You can't map drives from a computer startup script. ... Only from a user login ... The computer account has no session at this point. ... Give user the ability to connect their own printers. ...
    (microsoft.public.windows.server.scripting)
  • Re: Passing variables on the command line to a bash script
    ... > I've searched the archives of this group, ... so either it's dumb question or I'm using the wrong search ... > I'm trying to create a bash script that takes as command line ... Lew Pitcher, IT Specialist, Enterprise Data Systems ...
    (comp.unix.shell)
  • Re: Shell question
    ... >> I have to add a script to be ran whenever a user login to my Solaris ... >> regardless of the type of user's default shell. ...
    (comp.unix.shell)