startmsg(1M) startmsg(1M)NAME startmsg - sends messages to StartMonitor, which displays a progress bar during the A/UX boot process SYNOPSIS startmsg - startmsg [-d pcntdone] [-m msgselector [-n nextphase] [-p numphases] [-q] [substr1...substr4]] ARGUMENTS - Reads argument strings from standard input. These strings can contain any of the other startmsg options, just as they would be passed on the command line. If this option is used, none of the other options should be specified on the command line. -d pcntdone Specifies what percentage of the current phase is complete. -m msgselector [substr1... substr4] Specifies the index, msgselector, into an array of message strings to allow selection of up to four substrings to be displayed in the StartMonitor dialog box. When specified, these substrings are incorporated into the selected message string in corresponding order. Thus, the first substring replaces the first substring placeholder in the selected message string stored in the StartMonitor resource file. The second, third, and fourth substrings specified are handled similarly. -n nextphase Specifies which phase of booting is starting. -p numphases Specifies the total number of phases in the boot process. This message should normally be sent only once. -q Sends the quit signal to StartMonitor. DESCRIPTION startmsg sends messages to StartMonitor by means of a System V message queue during the boot process. These messages control the movement of the progress bar in the StartMonitor dialog box. The messages indicate how many boot phases there are, the current boot phase, what percentage of that phase is completed, what message is to be displayed, and what substrings to incorporate in the message. The messages are January 1992 1
startmsg(1M) startmsg(1M)stored as an array of strings in the StartMonitor resource file, /mac/sys/Startup/System Folder/%StartMonitor. The message displayed is the one at index msgselector in the array. Logically, the boot process is divided into phases based on the primary activities that occur. The normal boot process consists of the following six phases. 1. The A/UX Startup application loads the kernel. 2. The kernel is launched. Then init spawns macsysinit. If the -v (verbose) command option was not passed to launch during startup, macsysinit launches macsysinitrc, which launches StartMonitor and CommandShell. 3. The root file system is checked. 4. The autoconfig command runs and the device-driver startup scripts are executed. 5. File systems other than the root file system are checked. 6. Background processes (daemons) listed in /etc/inittab are spawned. Because StartMonitor does not run before phase 2, the very first startmsg command issued uses the -n option to start the progress bar at phase 3. Because this phase is approximately halfway through the total number of phases, the progress bar appears at about mid-position when you first see it. Because the final three phases are more time- consuming than the first three phases, the -d option allows incremental updating of the progress bar while you wait. Note that although you can specify a number outside the range of 1 to 100 for pcntdone, the progress bar cannot advance beyond the finish point for a given phase. While it is in phase 3 of the 6-phase A/UX boot process, the progress bar cannot advance more than half of its total length or less than a third the total length. To advance the progress bar further, you must use the -n option and its nextphase argument. StartMonitor monitors the boot process after it is spawned in phase 2. After this phase, you can use startmsg to establish the current phase and the completion percentages within the current phase. Normally, shell scripts, such as sysinitrc, invoke startmsg. After the root file system has been checked, applications 2 January 1992
startmsg(1M) startmsg(1M)that need to send messages to StartMonitor, and that are very slow in sending the messages, could invoke startmsg to send the messages for them. If the application needs to send many messages, it could create a pipe to startmsg and write startmsg argument strings into the pipe. In such cases, startmsg receives and processes one line of the input at a time, in the same order as it is generated, and exits when an end-of-file signal arrives. STATUS MESSAGES AND VALUES You can use standard input (such as a pipe) to input the arguments in accordance with the ``Synopsis'' section earlier in this manual page. If the standard input does not conform to the syntax prescribed for the command line, the following message appears: startmsg: too many args in stdin cmd There are also various usage messages that essentially echo the ``Synopsis'' section. Recheck your syntax as suggested by the message. FILES /etc/startmsg Executable file /usr/include/apple/startmsg Source-code file describing message structures SEE ALSO brc(1M), StartMonitor(1M) January 1992 3