- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- echo during the startup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 03:22 PM
05-16-2006 03:22 PM
echo during the startup
I have a startup script S100test, I put a few "echo" statements. when I reboot the machine, it does NOT echo anything.
When system is stable, I can run it and it echoes....
did I miss anything?
- Tags:
- rc(1M)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 03:34 PM
05-16-2006 03:34 PM
Re: echo during the startup
Am I missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 03:35 PM
05-16-2006 03:35 PM
Re: echo during the startup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 03:36 PM
05-16-2006 03:36 PM
Re: echo during the startup
is there any message in /etc/rc.log?
GOOD LUCK!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 08:56 PM
05-16-2006 08:56 PM
Re: echo during the startup
by man rc:
Script Output
To ensure proper reporting of startup events, startup scripts are
required to comply with the following guidelines for script output.
+ Status messages, such as
starting house daemon
must be directed to stdout. All error messages must be
directed to stderr.
+ Script output, both stdout and stderr, is redirected to log
file /etc/rc.log, unless the startup checklist mode is set to
the raw mode. In this case, all output goes to the console.
All error messages should be echoed to stdout or stderr.
+ Startup scripts are not allowed to send messages directly to
the console, or to start any daemons that immediately write to
the console. This restriction exists because these scripts
are now started by the /sbin/rc checklist wrapper. All script
output should go to either stdout or stderr, and thus be
captured in a log file. Any console output will be garbled.
+ When a startup script returns an exit code of 3, /sbin/rc can
display a specific message on the console prior to rebooting
the system. This is achieved by creating a text file named
/etc/rc.bootmsg containing the text to be displayed to the
console. Note that /sbin/rc deletes this file after
displaying the message, so startup scripts need to write this
file each time a specific message is required to be displayed
on console prior to reboot.
Enrico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 11:11 PM
05-16-2006 11:11 PM
Re: echo during the startup
# cp -p S100test /sbin/init.d/test
# rm S100test
# ln -s /sbin/init.d/test ./S100test
rgs,
ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2006 04:02 AM
05-17-2006 04:02 AM
Re: echo during the startup
it is a bash script, the script looks like this
#!/bin/bash
echo please answer your answer
read a
echo $a
(of course, it does more than that, but the above is the trouble I am encountering)
I know the script was invoked, but I saw
S100test get started, but it didnt output the echo statement nor asked me any question.
if output goes to rc.log (didnt see that file), how can I re-direct the output and input?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2006 04:21 AM
05-17-2006 04:21 AM
Re: echo during the startup
As to trying to get a startup script to ask for input when the machine is starting --- That is a VERY BAD idea in my opinion. Why? Because you want the machine to boot as quickly as possible. If it crashes in the middle of the night, there is the possiblity that the machine would be sitting and waiting on input from you for several hours causing it to not finish booting.
In my opinion you need to seriously rethink the use of a startup script that requires sys admin input.