/usr/sbin/rtc

/usr/sbin/rtc

Post by Alan Stang » Thu, 15 Feb 2001 01:45:56



Hello all,

why does Solaris still have

1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1

in root's crontab, when /usr/sbin/rtc isn't installed with the the OS?

--

 
 
 

/usr/sbin/rtc

Post by Juergen Kei » Thu, 15 Feb 2001 02:01:39



> why does Solaris still have

> 1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1

> in root's crontab, when /usr/sbin/rtc isn't installed with the the OS?

To manage a PC's real time clock?

% ls -l /usr/sbin/rtc
-r-xr-xr-x   1 root     bin         8812 Jan  6  2000 /usr/sbin/rtc
% uname -p
i386

 
 
 

/usr/sbin/rtc

Post by Barry Margoli » Thu, 15 Feb 2001 02:07:21




Quote:>Hello all,

>why does Solaris still have

>1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1

>in root's crontab, when /usr/sbin/rtc isn't installed with the the OS?

It looks like it's an optional package (SUNWcsu).  The [ -x /usr/sbin/rtc ]
part of the command tests to see whether the package is installed or not.

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

/usr/sbin/rtc

Post by Tony Walto » Thu, 15 Feb 2001 02:04:15



> Hello all,

> why does Solaris still have

> 1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1

> in root's crontab, when /usr/sbin/rtc isn't installed with the the OS?

Not on a SPARC, it isn't.

Because the default crontab is standard across both the SPARC and X86
architectures.  rtc is an x86-only thing, as the rtc manpage reveals:

Maintenance Commands                                      rtc(1M)

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Architecture                | IA                          |
    |_____________________________|_____________________________|
    | Availability                | SUNWcsu                     |
    |_____________________________|_____________________________|

IA is Intel Architecture.

--
Tony

 
 
 

/usr/sbin/rtc

Post by Chris Thomps » Thu, 15 Feb 2001 07:17:55






>>Hello all,

>>why does Solaris still have

>>1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1

>>in root's crontab, when /usr/sbin/rtc isn't installed with the the OS?

>It looks like it's an optional package (SUNWcsu).  The [ -x /usr/sbin/rtc ]
>part of the command tests to see whether the package is installed or not.

SUNWcsu is optional ?!?!?

I think you mean: /usr/sbin/rtc is part of the x86 version of SUNWcsu, but
not part of the sparc version.

Chris Thompson
Email: cet1 [at] cam.ac.uk

 
 
 

/usr/sbin/rtc

Post by Tony Walto » Thu, 15 Feb 2001 19:22:08





> >Hello all,

> >why does Solaris still have

> >1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1

> >in root's crontab, when /usr/sbin/rtc isn't installed with the the OS?

> It looks like it's an optional package (SUNWcsu).  The [ -x /usr/sbin/rtc ]
> part of the command tests to see whether the package is installed or not.

Which it only will be on an X86 box.

SUNWcsu is hardly optional - the "cs" bit of "csu" means "Core Solaris".

--
Tony Walton

 
 
 

/usr/sbin/rtc

Post by Martin Pau » Thu, 15 Feb 2001 20:43:19




>> why does Solaris still have

>> 1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1

>> in root's crontab, when /usr/sbin/rtc isn't installed with the the OS?

> Because the default crontab is standard across both the SPARC and X86
> architectures.  rtc is an x86-only thing, as the rtc manpage reveals:

So the question should be rephrased. As the SUNWcsr package which
contains root's crontab surely isn't the same for sparc and x86
anyway, why not have rtc removed from root's crontab in the
sparc version of the package ?

I've found this quite confusing when I noticed it the first time, too.

mp.
--
                         Martin Paul | Systems Administrator

Liechtensteinstrasse 22, A-1090 Wien | Tel: 01 4277 38803
        http://www.par.univie.ac.at/ | Fax: 01 4277 9388

 
 
 

/usr/sbin/rtc

Post by Barry Margoli » Fri, 16 Feb 2001 01:38:23




Quote:>So the question should be rephrased. As the SUNWcsr package which
>contains root's crontab surely isn't the same for sparc and x86
>anyway, why not have rtc removed from root's crontab in the
>sparc version of the package ?

Probably because the fewer files that are different across architectures,
the easier it is to maintain them.  The conditional execution allows them
to use the same file for both.

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. /usr/sbin/rtc

Just looking through my crontab for root, and there's this command in there
called /usr/sbin/rtc, which the comments claim checks for DST and adjusts
the clock accordingly and all that.

But! I don't have that command in /usr/sbin, or anywhere else for that matter.
And my clock changed just fine during the last time change.

The man page is there, though, and tells me all about it.  What up?

2. AIX Tar Floppies

3. no /usr/sbin/rtc, but in crontab

4. Xenix disk error

5. missing /usr/sbin/rtc

6. CD-RW and CD-ROM under Linux

7. /usr/sbin/rtc is missing

8. /usr/sbin/traceroute ha1 ksh: /usr/sbin/traceroute: not found

9. What is this?: /USR/SBIN/CRON[492]: (mail) CMD ( if [ -x /usr/sbin/exim ]; then /usr/sbin/exim -q >/dev/null 2>&1; fi)

10. help with /sbin and /usr/sbin permissions

11. Slackware and /usr/sbin/sbin/

12. dangerous permissions on /sbin and /usr/sbin