Univention Bugzilla – Bug 44427
dhclient/linklocal/fallback uses wrong time format
Last modified: 2021-05-25 16:02:01 CEST
Created attachment 8791 [details] Fix lease time format print ' expire %d %d/%d/%d %s:%s:%s;' % (d.weekday(), d.year, d.month, d.day, str(d.hour).zfill(2), str(d.minute).zfill(2), str(d.second).zfill(2)) man 5 dhclient.conf: > LEASE DECLARATIONS ... > Dates are specified as follows: > <weekday> <year>/<month>/<day> <hour>:<minute>:<second> > The weekday is present to make it easy for a human to tell when a lease expires - it's specified as > a number from zero to six, with zero being Sunday. ^^^^^^^^^^^^^^^^^^ >>> datetime(2017,4,30).isoweekday() # Monday is 1 and Sunday is 7 7 >>> datetime(2017,4,30).weekday() # Monday is 0 and Sunday is 6 6 >>> datetime(2017,4,30).strftime('%w %a') # 0 is Sunday and 6 is Saturday '0 Sun'
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
This is still broken and needs to be fixed [feature/ucs5] b944dfa7d0 Bug #44427: Fix DHCP lease format .../conffiles/etc/dhcp/dhclient.conf | 17 ++++++++--------- base/univention-network-manager/debian/changelog | 6 ++++++ doc/changelog/changelog-5.0-0.xml | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-)
REOPEN: # ucr set foo=dhcp Create foo # ucr commit /etc/dhcp/dhclient.conf File: /etc/dhcp/dhclient.conf Traceback (most recent call last): File "<stdin>", line 15, in <module> File "<stdin>", line 15, in <genexpr> AttributeError: 'NoneType' object has no attribute 'group'
(In reply to Florian Best from comment #3) > REOPEN: > > # ucr set foo=dhcp > Create foo > # ucr commit /etc/dhcp/dhclient.conf > File: /etc/dhcp/dhclient.conf > Traceback (most recent call last): > File "<stdin>", line 15, in <module> > File "<stdin>", line 15, in <genexpr> > AttributeError: 'NoneType' object has no attribute 'group' missing `if match` in list comprehension. Fixed: [feature/ucs5] cbbe5a11f4 fixup! Bug #44427: Fix DHCP lease format base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Package: univention-network-manager Version: 12.0.0-3A~5.0.0.202007081056 Branch: ucs_5.0-0
OK: changes OK: list comprehension OK: changelog
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".