Todd has also given me permission to reproduce the following private e-mail
which started before I became aware of this newsgroup thread (thanks,
Todd!):
David,
Thanks for the pointer about the SAFEMODE variable - I’ve already
incorporated that into the next version of rc.local so this doesn’t
happen again. I think we’ve got a solution to our problem by
artificially making the program loop before it gets to the part that
cause it to hang. Anyway, thanks for all your help!
–Todd
-----Original Message-----
From: David Bacon [mailto:dbacon@qnx.com]
Sent: Thursday, March 27, 2003 12:42 PM
To: ‘toddj@appliedperception.com’
Subject: RE: Rc.local
If you’re looking for a general solution, I note that in
/etc/rc.d/rc.sysinit, there is one place where there is a test for the
environment variable SAFEMODE being set. You could use that same
variable to decide whether or not to look for rc.local (I mean modify
rc.sysinit to do that). Alternatively, you could just have your
rc.local immediately exit whenever it saw `! -z “$SAFEMODE”’.
Is booting from floppy also an option, by the way?
dB
Xiaodan Tang <xtang@qnx.com> wrote in message
news:b5veg2$aqg$1@nntp.qnx.com…
Can you drop into “debug shell” ?
If you have the access to the console, you can press “SPACE” during
boot, and enable “debug shell”. Let the boot continue untile you got
a prompt, type “exit”, you will then got a shell prompt in second time.
You now have all your binaries in place (/bin, /sbin, …), just no PATH.
You can do a “/bin/mv /etc/rc.d/rc.local /etc/rc.d/rc.local.o” to get rid
of the problem rc.local
You might want to keep a safe /.altboot if possiable.
-xtang
Todd Jochem <> toddj@appliedperception.com> > wrote in message
news:b5vc8v$153$> 1@inn.qnx.com> …
Unfortunately, this is in a remote, embedded system. > 
“Chris McKillop” <> cdm@qnx.com> > wrote in message
news:b5vcb5$97o$> 1@nntp.qnx.com> …
Todd Jochem <> toddj@appliedperception.com> > wrote:
Hi all,
I’m in a jam - I’ve got a program that is started from rc.local.
Unfortunately, I broke that program and as a result, the machine
hangs.
The
kicker is that I can’t log in via the console or telnet to fic the
problem -
I’ve got about 5 seconds and I can’t type that fast! So, is there a
way
to
by-pass rc.local. I can’t seem to figure out how to do it from the
available
Safe Mode options. Thanks,
One option, if you have a CDROM in the system, is to boot from the
install
CD and pick Run From CDROM. Your disk filesystems will all show up in
/fs
and you can edit/delete/move your rc.local.
chris
–
Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I
get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/
\