Error in SunOS4.1.1 /etc/rc

Barry Margolin barmar at think.com
Tue Feb 26 08:59:59 AEST 1991


In article <4132 at gmdzi.gmd.de> czech at gmdzi.gmd.de writes:
>We're here running some Sun SPARCstations, SunOS 4.1.1. Every time a
>machine boots I get an error message:
>
> su: illegal option -- c
> 	usage: uucico [-xNUM] [-r[0|1]] -sSYSTEM -uUSERID -dSPOOL -iINTERFACE
>
>The problem is in the startup script /etc/rc. Here are the lines in question:
>
>		if [ -d /usr/lib/uucp ]; then
>			su uucp -c /usr/lib/uucp/uusched & \
>					echo -n ' uucp'
>
>The line with the 'su uucp' is obviously syntactically wrong. The
>argument '-c' is between the user name 'uucp' and the command
>'/usr/lib/uucp/uusched'.
>The manual page of uusched(8c) gives exactly the same (wrong) syntax.
>
>Now my question: For what purpose is the '-c' in that line. How should
>the line look if it was correct. Did it run under SunOS 4.0.3 or earlier
>versions?

All the arguments to su after the user name are passed to the subprocess,
which is running the user's default shell.  That command line assumes that
uucp is running a normal shell, which allows the option '-c' to specify a
command line to execute.  You apparently have uucp's login shell set to
uucico, which doesn't support this usage.

The passwd file that got installed here when we upgraded to 4.1.1 doesn't
specify uucico as its login shell, it lets the shell default.
--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.admin mailing list