Univention Bugzilla – Bug 35906
univention-samba4-backup has unused parameters
Last modified: 2023-03-25 06:48:37 CET
Please check if a test case is possible. +++ This bug was initially created as a clone of Bug #35085 +++ 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: Options: --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: /etc/univention/templates/files/etc/cron.d/univention-samba4-backup 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.
r55502: * 51_samba4/20backup_parameters_usage: check that backup cron job parameters are set (Bug #35906).
Currently the test skips the actual check for the options unless the corresponding UCR variable is set. If the UCR variable is not set, the test needs to actually set some option to confirm that it's committed to the cron file, e.g. > ucr set samba4/backup/cron/options="--days 88"
(In reply to Arvid Requate from comment #2) > Currently the test skips the actual check for the options unless the > corresponding UCR variable is set. If the UCR variable is not set, the test > needs to actually set some option to confirm that it's committed to the cron > file, e.g. > > > ucr set samba4/backup/cron/options="--days 88" OK r57911: * 51_samba4/20backup_parameters_usage: force UCR vars settings for the test (Bug #35906).
Ok.