| Summary: | Bootup does not complete | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Mark Jacobs <jacobsm> |
| Component: | conf | Assignee: | Brian Somers <brian> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Mark Jacobs
2000-08-18 13:30:00 UTC
Responsible Changed From-To: freebsd-bugs->brian Over to the maintainer. State Changed From-To: open->closed Please cvsup again. You got John Baldwin's MFC's at a bad time where /etc/rc was using $ppp_user but /etc/defaults/rc.conf hadn't yet defined the variable. I believe you are incorrect. /etc/defaults/rc.conf at the 1.53.2.9 level does have the default defined. I also cvsuped last night (8/20) 21:00 edt, rebuilt system and same error occurs. Mark Jacobs State Changed From-To: closed->open Submitter says they've cvsup'd and the problem persists.... Ok. Here is the requested output
/etc/rc.network: for ifn in ${sppp_interfaces}; do
/etc/rc.network: case ${ppp_enable} in
/etc/rc.network: if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" !=
"direct" \
/etc/rc.network: -a "${ppp_mode}" != "dedicated" \
/etc/rc.network: -a "${ppp_mode}" != "background" ]; then
/etc/rc.network: ppp_mode="auto"
/etc/rc.network: ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}"
/etc/rc.network: case ${ppp_nat} in
/etc/rc.network: ppp_command="${ppp_command} -nat"
/etc/rc.network: ppp_command="${ppp_command} ${ppp_profile}"
/etc/rc.network: echo -n "Starting ppp as \"${ppp_user}\""
/etc/rc.network: su ${ppp_user} -c "exec ${ppp_command}"
/etc/rc.conf:ppp_enable="YES"
/etc/rc.conf:ppp_mode="auto"
/etc/rc.conf:ppp_nat="NO"
/etc/rc.conf:ppp_profile="cyber"
/etc/defaults/rc.conf:sppp_interfaces="" # List of sppp interfaces.
/etc/defaults/rc.conf:#sppp_interfaces="isp0" # example: sppp over ISDN
/etc/defaults/rc.conf:ppp_enable="NO" # Start user-ppp (or NO).
/etc/defaults/rc.conf:ppp_mode="auto" # Choice of "auto", "ddial",
"direct" or "dedicated".
/etc/defaults/rc.conf:ppp_nat="YES" # Use PPP's internal network
address translation or NO.
/etc/defaults/rc.conf:ppp_profile="papchap" # Which profile to use from
/etc/ppp/ppp.conf.
/etc/defaults/rc.conf:ppp_user="root" # Which user to run ppp as
Mark Jacobs
Here is the output of the patch to rc.network Starting ppp as "root"+ su root -c exec /usr/sbin/ppp -quiet -auto cyber Drops into shell as before at this point. Mark Jacobs > Here is the output of the patch to rc.network > > Starting ppp as "root"+ su root -c exec /usr/sbin/ppp -quiet -auto cyber > > Drops into shell as before at this point. ??? And what happens when you run su root -c "exec /usr/sbin/ppp -quiet -auto cyber" on the command line from a ``sh'' prompt as root ? You haven't got a dodgy version of su(1) in your PATH have you ? Am I being insensitive or is this silly ? > Mark Jacobs -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! > > And what happens when you run > > su root -c "exec /usr/sbin/ppp -quiet -auto cyber" > > on the command line from a ``sh'' prompt as root ? The command executes but does not give the usual PPP messages. >You haven't got a dodgy version of su(1) in your PATH have you ? > > Am I being insensitive or is this silly ? which su /usr/bin/su ls -l /usr/bin/su -r-sr-xr-x 1 root wheel 7960 Aug 20 22:01 /usr/bin/su It might be something in my configuration but I can't find it. I have been using FreeBSD for a couple of years now (still learning all the time), but I do have over 20 years experience in mainframe systems programming so I am not a complete novice. Mark Jacobs > > > > And what happens when you run > > > > su root -c "exec /usr/sbin/ppp -quiet -auto cyber" > > > > on the command line from a ``sh'' prompt as root ? > > The command executes but does not give the usual PPP messages. The -quiet bit silences that. > >You haven't got a dodgy version of su(1) in your PATH have you ? > > > > Am I being insensitive or is this silly ? > > which su > /usr/bin/su > > ls -l /usr/bin/su > -r-sr-xr-x 1 root wheel 7960 Aug 20 22:01 /usr/bin/su > > It might be something in my configuration but I can't find it. I have > been > using FreeBSD for a couple of years now (still learning all the time), > but I > do have over 20 years experience in mainframe systems programming so > I am not a complete novice. The only thing I can figure at this point is that you've got a different PATH in /etc/rc.network. What happens if you qualify ``su'' as ``/usr/bin/su'' ? > Mark Jacobs -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! I changed the su command to /usr/bin/su , same error. I took off the -quiet option from the ppp command. ppp messages still were not issued. Typed in exit at prompt, bootup continued to login prompt. ppp is not active. Problem might not be with su command but with ppp at this point. Mark Jacobs PS. Thanks for your assistance State Changed From-To: open->feedback Does this problem persist ? Can I confirm that you say that running /usr/sbin/su root -c "exec /usr/sbin/ppp -quiet -auto cyber" drops you into a shell when it's invoked from /etc/rc.network, but works when you type it in on the command line ? Assuming you mean /usr/bin/su, not /usr/sbin/su, Yes the problem still occurs (just tried it last week). I am currently cvsuped to yesterdays 4.1 stable. Mark Jacobs jacobsm@gate.net > Assuming you mean /usr/bin/su, not /usr/sbin/su, Yes the problem still > occurs (just tried it last week). I am currently cvsuped to yesterdays > 4.1 stable. Oops yes, I meant /usr/bin/su :-) What does the relevant profile in /etc/ppp/ppp.conf look like ? > Mark Jacobs > jacobsm@gate.net Cheers. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! > On Sun, 24 Sep 2000, Brian Somers wrote: > > > What does the relevant profile in /etc/ppp/ppp.conf look like ? > > > > Here is my /etc/ppp/ppp.conf [.....] > Of course this config works when I enter the ppp command from the shell. Well, there's nothing peculiar in there. This brings me back to my original thought - ${ppp_user} must be unset. It's the only way I can see that /usr/bin/su can drop you into a shell when it doesn't on the command line. Does the "Starting ppp as root" message come out just before you get your shell ? Also, what does ``ps j'' say when you get to the rogue prompt ? > Mark Jacobs > jacobsm@gate.net Cheers. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! Yes. The starting PPP as root message is issued. Then the shell prompt is issued without a newline character. The ps j command show the following PS Warning: /var/run/dev/db: No such file of Directory USER PID PPID PGID SESS JOBC STAT TT TIME COMMAND root 327 1 327 c4ba00 0 Is #C1 0:00.04 sh /etc/rc root 411 327 411 c4ba00 1 R #C1 0:00.03 /usr/local/bin/bash root 414 411 414 c4ba00 1 R+ #C1 0:00.00 ps j Mark Jacobs jacobsm@gate.net > Yes. The starting PPP as root message is issued. Then the shell prompt > is issued without a newline character. > > The ps j command show the following > > PS Warning: /var/run/dev/db: No such file of Directory > > USER PID PPID PGID SESS JOBC STAT TT TIME COMMAND > root 327 1 327 c4ba00 0 Is #C1 0:00.04 sh /etc/rc > root 411 327 411 c4ba00 1 R #C1 0:00.03 > /usr/local/bin/bash > root 414 411 414 c4ba00 1 R+ #C1 0:00.00 ps j Where's ``bash'' coming from ? Maybe you have root's shell set to bash ? Would you be able to insert a ``set'' command just before the ppp invocation in rc.network ? > Mark Jacobs > jacobsm@gate.net Cheers. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! I found the problem. In my /root/.cshrc file at the end I have the following line [ -x /usr/local/bin/bash ] && exec /usr/local/bin/bash I guess that the change to the bash shell from csh messes up the rc.network script. (But why only at that point? ) I have had this change to my /root/.cshrc file for many months without any problems. Mark Jacobs jacobsm@gate.net > I found the problem. In my /root/.cshrc file at the end I have the > following line > > [ -x /usr/local/bin/bash ] && exec /usr/local/bin/bash > > I guess that the change to the bash shell from csh messes up the > rc.network script. (But why only at > that point? ) I have had this change to my /root/.cshrc file for many > months without any problems. Ha, I really should have thought of that. I do this sort of thing myself on several machines :-/ The difference is that the rc scripts weren't using ``su'' before :-) > Mark Jacobs > jacobsm@gate.net Thanks. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! State Changed From-To: feedback->closed The problem was due to a bogus ``exec'' in the users login profile. |