Logging on to shut down

I’m sorry to constantly make references to things that I like in QNX4 that
don’t work in QNX6 but I think that many of them are things that are nice
features. I will be slowly releasing my list.

In QNX4, I have added a line to the /etc/passwd file that ends in
:/bin/shutdown -f

That way when the system is otherwise idle I can reboot without having to
log in as root first.

When trying this in QNX6 I get:
/bin/shutdown -f not found
as if it were assuming that the -f was part of the pathname. SO,

Question 1: Can I pass options to the startup command in the password file?

In trying to figure out this problem I decided to just remove the ’ -f’.
But then when I tried to login with this special ID my login just fails
without a message and I get another login prompt.

Question 2: Watzup!

\

Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net

I’ve done further testing and this is clearly a bug (or two) in login.

FIRST BUG REPORT:

The documentation says that you can specify an initial command and that the
initial command may have options or arguments seperated by spaces or tabs.
But the action that occurs is that everything parsed after the last colon
‘:’ is plugged in as a pathname.

SECOND BUG REPORT:

If I set the initial command to ‘/bin/shutdown’, then login does not spawn
or exec to that. Instead, without issuing any kind of error or warning,
login just comes back and prompts for another login ID.

Could QSSL please comment.


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:9s71bh$rnn$1@inn.qnx.com

I’m sorry to constantly make references to things that I like in QNX4 that
don’t work in QNX6 but I think that many of them are things that are nice
features. I will be slowly releasing my list.

In QNX4, I have added a line to the /etc/passwd file that ends in
:/bin/shutdown -f

That way when the system is otherwise idle I can reboot without having to
log in as root first.

When trying this in QNX6 I get:
/bin/shutdown -f not found
as if it were assuming that the -f was part of the pathname. SO,

Question 1: Can I pass options to the startup command in the password
file?

In trying to figure out this problem I decided to just remove the ’ -f’.
But then when I tried to login with this special ID my login just fails
without a message and I get another login prompt.

Question 2: Watzup!

\

Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net

“Operating System Tech Support” <os@qnx.com> wrote in message
news:9sbj2p$c91$1@nntp.qnx.com

“Bill Caroselli” <> qtps@earthlink.net> > wrote in message
news:9s9gd8$h3v$> 1@inn.qnx.com> …
I’ve done further testing and this is clearly a bug (or two) in login.
FIRST BUG REPORT:

The documentation says that you can specify an initial command and that
the
initial command may have options or arguments seperated by spaces or
tabs.
But the action that occurs is that everything parsed after the last
colon
‘:’ is plugged in as a pathname.
I look into the Doc bug.

I don’t think this is a documentation bug. I think it’s a login bug.


If I set the initial command to ‘/bin/shutdown’, then login does not
spawn
or exec to that. Instead, without issuing any kind of error or warning,
login just comes back and prompts for another login ID.

It’s more then likely you’re in photon doing these operations, in which
case
you’re missing the error messages put to the console. I’ve successfully
been able
to add a “shutdown” user which shutsdown the system upon login. Make sure
the
shutdown user has root uid, and place the shutdown command in a shell
script.
Simply call that script as the intial command from your passwd file (this
gets around
the problem of arguments as well)

No. I’m working from text mode consoles. I.E. No photon, so I’m not
missing any error messages.

OK. Well using a script will get me around the problem. But I would prefer
to set the initial command to ‘/bin/shutdown’.


\

Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:9s9gd8$h3v$1@inn.qnx.com

I’ve done further testing and this is clearly a bug (or two) in login.

FIRST BUG REPORT:

The documentation says that you can specify an initial command and that
the
initial command may have options or arguments seperated by spaces or tabs.
But the action that occurs is that everything parsed after the last colon
‘:’ is plugged in as a pathname.

I look into the Doc bug.

If I set the initial command to ‘/bin/shutdown’, then login does not spawn
or exec to that. Instead, without issuing any kind of error or warning,
login just comes back and prompts for another login ID.

It’s more then likely you’re in photon doing these operations, in which case
you’re missing the error messages put to the console. I’ve successfully
been able
to add a “shutdown” user which shutsdown the system upon login. Make sure
the
shutdown user has root uid, and place the shutdown command in a shell
script.
Simply call that script as the intial command from your passwd file (this
gets around
the problem of arguments as well)

-Adam

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:9sbmm3$5s$1@inn.qnx.com

I don’t think this is a documentation bug. I think it’s a login bug.

I’ll investigate that one.

OK. Well using a script will get me around the problem. But I would
prefer
to set the initial command to ‘/bin/shutdown’.

I looked into this one, it turns out that shutdown (or phshutdown) is used
as a daemon for photon reasons. The fact that login “exec”'s the command
causes problems with the daemonizing. It’ll will be put in as a bug for a
future release.

-Adam