File: networking.py

package info (click to toggle)
python3-dmm 0.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: python: 441; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 294 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
"""
networking functions for for dmm.
"""

def set_chroot_hostname(chroot, hostname):
    """
    Writes a hostname in a chroot
    Could be replaced by writefile?
    """
    text_file = open(chroot + "/etc/hostname", "w")
    hostname_write = text_file.write(hostname)
    text_file.close()