← Back to team overview

pkg-perl-maintainers team mailing list archive

[Bug 2004007] Re: cronjob fails in dash

 

** Description changed:

  * Impact
  
  The cronjob included in the package errors out due to incorrect shell
  syntax
  
  * Testcase
  
  $ sudo /etc/cron.daily/ocsinventory-agent
  
- triggered manually or by crong should work without error
+ triggered manually or by cron should work without error
  
  * Regression potential
  
  The job depends on bash now and wouldn't work on system without that
  shell installed. It's unlikely that bash isn't going to be installed
  though and even in that case it wouldn't be a regression since the
  script is already not working
  
  ---------------------------------
  
  Ubuntu 22.04 comes with ocsinventory-agent in version 2:2.8-2. In this
  version /etc/cron.daily/ocsinventory-agent holds the `$RANDOM` bashism.
  As `/bin/sh` links to `dash` by default the script exits with an error:
  
  ```
  $ dash /etc/cron.daily/ocsinventory-agent
  /etc/cron.daily/ocsinventory-agent: 19: arithmetic expression: expecting primary: " /100 "
  ```
  
  There is also an older debian bug: https://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=988245

-- 
You received this bug notification because you are a member of Debian
Perl Group, which is subscribed to ocsinventory-agent in Ubuntu.
https://bugs.launchpad.net/bugs/2004007

Title:
  cronjob fails in dash

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ocsinventory-agent/+bug/2004007/+subscriptions



References