generated crontab does not work in Japanese locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ClamTk |
Fix Released
|
Undecided
|
Unassigned | ||
clamtk (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In Japanese locale, `date +'%b' contains a blank space, which breaks "--log" option for clamscan in crontab.
==========
$ crontab -l
0 1 * * * /usr/bin/clamscan --exclude-
==========
==========
$ locale | grep LC_TIME
LC_TIME=
$ /usr/bin/clamscan --exclude-
ERROR: Problem with internal logger.
ERROR: Can't open /home/ubuntu/
==========
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: clamtk 4.36-1
ProcVersionSign
Uname: Linux 3.2.0-17-
ApportVersion: 1.93-0ubuntu2
Architecture: i386
CasperVersion: 1.304
Date: Thu Mar 1 00:38:46 2012
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Beta i386 (20120228.1)
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=ja_JP.UTF-8
SHELL=/bin/bash
SourcePackage: clamtk
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
Changed in clamtk: | |
assignee: | nobody → Nobuto MURATA (nobuto) |
status: | New → In Progress |
Changed in clamtk (Ubuntu): | |
assignee: | nobody → Fabrice Coutadeur (fabricesp) |
status: | New → In Progress |
Attached patch adds a quotation for "--log" option, this will fix the issue.
========== dir=.thunderbir d --exclude- dir=.mozilla- thunderbird --exclude- dir=.evolution --exclude-dir=Mail --exclude-dir=kmail --detect-pua -i -r /home/ubuntu --exclude- dir=/home/ ubuntu/ .clamtk/ viruses --log=" $HOME/. clamtk/ history/ $(date +\%b-\%d-\%Y).log" 2>/dev/null # clamtk-scan
$ crontab -l
0 1 * * * /usr/bin/clamscan --exclude-
==========
========== dir=.thunderbir d --exclude- dir=.mozilla- thunderbird --exclude- dir=.evolution --exclude-dir=Mail --exclude-dir=kmail --detect-pua -i -r /home/ubuntu --exclude- dir=/home/ ubuntu/ .clamtk/ viruses --log=" $HOME/. clamtk/ history/ $(date +\%b-\%d-\%Y).log"
$ /usr/bin/clamscan --exclude-
----------- SCAN SUMMARY -----------
Known viruses: 1153191
Engine version: 0.97.3
Scanned directories: 107
Scanned files: 119
Infected files: 0
Data scanned: 13.89 MB
Data read: 42.04 MB (ratio 0.33:1)
Time: 4.400 sec (0 m 4 s)
==========