OSDN Git Service

Add ntpdate and cout-init setting.
authorTatsuki SUGIURA <sugi@osdn.jp>
Tue, 29 Dec 2020 15:53:09 +0000 (00:53 +0900)
committerTatsuki SUGIURA <sugi@osdn.jp>
Tue, 29 Dec 2020 15:53:09 +0000 (00:53 +0900)
create-image

index 12f78ef..050559b 100755 (executable)
@@ -118,7 +118,7 @@ class ImageCreator
     with_rootfs do |dir, devices|
       system({'DEBIAN_FRONTEND' => 'noninteractive'}, "chroot", dir, *%w(sudo dpkg --remove td-agent smartmontools snmpd lm-sensors arrayprobe megacli megacli-check-change megaclisas megaclisas-status fancontrol))
 
-      pkgs = %w(apt-transport-https locales-all ntp rsync python-apt git subversion less lv cloud-init tmux screen)
+      pkgs = %w(apt-transport-https locales-all ntp ntpdate rsync python-apt git subversion less lv cloud-init tmux screen irqbalance)
       if File.read("#{dir}/etc/debian_version").to_f >= 9.0
         pkgs << 'cloud-guest-utils'
       end
@@ -151,6 +151,8 @@ class ImageCreator
         c << "\nserver 169.254.169.123 prefer iburst\n"
         File.write "#{dir}/etc/ntp.conf", c
       end
+
+      File.write "#{dir}/etc/cloud/cloud.cfg.d/50_keep_apt_source.cfg" "apt_preserve_sources_list: true\n"
     end
   end