Skip to content
Snippets Groups Projects

Curtin Userdata customization: timezone, security/limits

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Fulvio Galeazzi
    Edited
    curtin_userdata_ubuntu_amd64_generic_trusty_csd 1.17 KiB
    # Set timezone and reconfigure tzdata
    # Add couple of lines to /etc/security/limits.conf (Sysctl parameters are handled via Juju)
    # Add pre-up condition for eth0: if declared in a bond, then do not activate as single interface
    
    diff -c curtin_userdata_ubuntu_amd64_generic_trusty.orig curtin_userdata_ubuntu_amd64_generic_trusty_csd 
    
    *** curtin_userdata_ubuntu_amd64_generic_trusty.orig    2016-09-22 10:05:35.604408950 +0200
    --- curtin_userdata_ubuntu_amd64_generic_trusty_csd     2016-09-22 11:08:45.042776292 +0200
    ***************
    *** 24,29 ****
    --- 24,33 ----
        driver_06_depmod: ["curtin", "in-target", "--", "depmod"]
        driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"]
      {{endif}}
    +   timezone_01_config: ["curtin", "in-target", "--", "sh", "-c", "ln -sf /usr/share/zoneinfo/Europe/Vatican /etc/timezone"]
    +   timezone_02_set: ["curtin", "in-target", "--", "sh", "-c", "dpkg-reconfigure --frontend noninteractive tzdata"]
    +   limits_01_add: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '*  soft  nofile  1048576' >> /etc/security/limits.conf ; /bin/echo '*  hard  nofile  1048576' >> /etc/security/limits.conf"]
    
      power_state:
        mode: reboot
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment