timezone module: Enhanced update command for Debian/Ubuntu (#34390)
* timezone module: Symlink to /etc/localtime before dpkg-reconfigure in Debian/Ubuntu * timezone module: Symlink rather than hard link
This commit is contained in:
parent
ac7e62ec08
commit
fec85a42a6
1 changed files with 2 additions and 3 deletions
|
@ -336,9 +336,8 @@ class NosystemdTimezone(Timezone):
|
||||||
# Distribution-specific configurations
|
# Distribution-specific configurations
|
||||||
if self.module.get_bin_path('dpkg-reconfigure') is not None:
|
if self.module.get_bin_path('dpkg-reconfigure') is not None:
|
||||||
# Debian/Ubuntu
|
# Debian/Ubuntu
|
||||||
# With additional hack for https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1554806
|
self.update_timezone = ['%s -sf %s /etc/localtime' % (self.module.get_bin_path('ln', required=True), tzfile),
|
||||||
self.update_timezone = ['rm -f /etc/localtime', '%s --frontend noninteractive tzdata' %
|
'%s --frontend noninteractive tzdata' % self.module.get_bin_path('dpkg-reconfigure', required=True)]
|
||||||
self.module.get_bin_path('dpkg-reconfigure', required=True)]
|
|
||||||
self.conf_files['name'] = '/etc/timezone'
|
self.conf_files['name'] = '/etc/timezone'
|
||||||
self.allow_no_file['name'] = True
|
self.allow_no_file['name'] = True
|
||||||
self.conf_files['hwclock'] = '/etc/default/rcS'
|
self.conf_files['hwclock'] = '/etc/default/rcS'
|
||||||
|
|
Loading…
Reference in a new issue