diff options
author | Joshua Harlow <harlowja@gmail.com> | 2013-09-02 22:52:28 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2013-09-02 22:52:28 -0700 |
commit | af2264dd823d2861a470b566c558ac764f255ef4 (patch) | |
tree | d8c99ea5b495bcfb3490a14d22af31a9d8b6f079 /cloudinit/distros/__init__.py | |
parent | 73863ed53d87e0eb3c24449ef164089531bc9679 (diff) | |
download | vyos-cloud-init-af2264dd823d2861a470b566c558ac764f255ef4.tar.gz vyos-cloud-init-af2264dd823d2861a470b566c558ac764f255ef4.zip |
Save only 512 bytes and use different file paths for debian/rhel
LP: #1198297
Diffstat (limited to 'cloudinit/distros/__init__.py')
-rw-r--r-- | cloudinit/distros/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 49b129ae..3c536f2b 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -52,7 +52,7 @@ class Distro(object): ci_sudoers_fn = "/etc/sudoers.d/90-cloud-init-users" hostname_conf_fn = "/etc/hostname" tz_zone_dir = "/usr/share/zoneinfo" - random_seed_fn = "/var/lib/random-seed" + random_seed_fn = None def __init__(self, name, cfg, paths): self._paths = paths @@ -172,7 +172,8 @@ class Distro(object): def set_random_seed(self, seed): if self.random_seed_fn: - util.write_file(self.random_seed_fn, seed, mode=0600) + # Ensure we only write 512 bytes worth + util.write_file(self.random_seed_fn, seed[0:512], mode=0600) def update_hostname(self, hostname, fqdn, prev_hostname_fn): applying_hostname = hostname |