SUMMARY: Solaris 9 - logadm and quotes

From: John Horne <J.Horne_at_plymouth.ac.uk>
Date: Fri Jul 12 2002 - 04:22:39 EDT
Hello,

I got one reply to this from Philip.Miller@ogilvy.com, who suggested simply
using underscores (hard spaces) rather than actual ones. Pretty obvious when
you think about it :-) Not ideal, but perfectly okay in this situation since
hopefully mail messages will only be sent very rarely.


John.

The original message:

Has anyone got Solaris 9's logadm to work when using embedded quotes? I'm
basically trying to do something like:

     /var/adm/backups -s 0b -b 'test -s /var/adm/backups || (echo | mailx -s 
          "Backup log is empty" root)'

which should test if the file is empty before rotating it. If it is empty
then email root; if not then just rotate the file.

However, trying to enter the command I get:

  logadm -w /var/adm/backups -s 0b -b 'test -s /var/adm/backups ||
            (echo | mailx -s "Backup log is empty" root)'
  logadm: /etc/logadm.conf line 49: Error: Can't protect quotes in <test -s
    /var/adm/backups || (echo | mailx -s "Backup log is empty" root)>
  logadm: Error: bailing out due to command line errors
  Use "logadm -h" for help.

No matter what combination of single quotes, double quotes and '\' I use, I
just cannot seem to get it to accept embedded quotes. Anyone any ideas or
done this? It seems a reasonable request to to test for an empty file so
that we can check if backups are indeed running (yes, there are other ways
of doing this).

------------------------------------------------------------------------
John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
E-mail: jhorne@plymouth.ac.uk
PGP key available from public key servers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Jul 12 04:28:01 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:48 EST