[Change Request] Use single quotes for the mysql backup cronjob.

Todd Zullinger tmz at pobox.com
Fri Mar 20 15:06:45 UTC 2009


Paul W. Frields wrote:
> On Fri, Mar 20, 2009 at 01:20:09PM +0100, Mark Wormgoor wrote:
>> Ricky Zhou wrote:
>>> This has been causing us to get extra cron spam (and stalling mysql
>>> updates).  I doubt anybody would consider this very risky :-)
>>>
>>> ---
>>>  manifests/services/db.pp |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/manifests/services/db.pp b/manifests/services/db.pp
>>> index fbed669..b5a7a29 100644
>>> --- a/manifests/services/db.pp
>>> +++ b/manifests/services/db.pp
>>> @@ -37,7 +37,7 @@ class mysqlBackup {
>>>      }
>>>       cron { mysql-backup:
>>> -        command => "time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql",
>>> +        command => 'time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql',
>>
>> Can you use $(($RANDOM/20)) between single quotes?
>
> Not in a bash shell, but these quotes aren't used in that context AIUI.

Right, in puppet, using single quotes keeps puppet itself from trying
to expand the variables.  That way, the command you want gets passed
to the shell.  Knowing next to nothing about infra's puppet setup, the
change looks sane to me -- double quotes would surely be broken. :)

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Every man should have a college education in order to show him how
little the thing is really worth.
    -- Elbert Hubbard (1856-1915), "A Message to Garcia"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-infrastructure-list/attachments/20090320/3b91c3b7/attachment.sig>


More information about the Fedora-infrastructure-list mailing list