Bug 35085 - univention-samba4-backup has unused parameters
univention-samba4-backup has unused parameters
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 3.2
All Linux
: P5 enhancement (vote)
: UCS 3.2-2-errata
Assigned To: Felix Botner
Arvid Requate
Depends on:
Blocks: 35906
  Show dependency treegraph
Reported: 2014-06-10 14:01 CEST by Roman Dietiker
Modified: 2014-09-11 15:01 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Roman Dietiker 2014-06-10 14:01:12 CEST
The script univention-samba4-backup is called as followed, from a cron job:
0 3 * * * root /usr/sbin/univention-samba4-backup

In the script itself are some parameter declared:
   --help|-h                   display this message
   --where|-w <DIR>            backup directory
   --from-where|-f <DIR>       samba provision directory
   --days|-d <INT>             retention period in days

But the template for writing the Cron Job is ignoring those parameters:
print "%s root /usr/sbin/univention-samba4-backup" % samba4_backup_cron

It would be usefull to map those parameters with UCR variables.
For example, we should be able to configure the retention period but don't want to modify the template, so not risking any incompatibility with later upgrades.
Comment 1 Felix Botner univentionstaff 2014-07-08 16:59:00 CEST

i added the UCR variable samba4/backup/cron/options to configure options for univention-samba4-backup.

-> ucr set samba4/backup/cron/options="--days 88"
Setting samba4/backup/cron/options
File: /etc/cron.d/univention-samba4-backup
Multifile: /etc/samba/smb.conf

-> more /etc/cron.d/univention-samba4-backup
0 3 * * * root /usr/sbin/univention-samba4-backup --days 88

YAML: 2014-06-17-univention-samba4.yaml
Comment 2 Arvid Requate univentionstaff 2014-07-09 16:51:40 CEST
Comment 3 Janek Walkenhorst univentionstaff 2014-07-10 13:35:24 CEST