예제 #1
0
def capabilities():
    """Test capabilities functions in new distrition
    For openwrt:
      mv /etc/banner /etc/banner.disable
      fab -s "/bin/ash -l -c" capabilities
    """

    print ("SYSTEM")
    print ("======")
    print("Distribution: %s" % system.distrib_id())
    print("Release: %s" % system.distrib_release())
    print("Codename: %s" % system.distrib_codename())
    print("Desc: %s" % system.distrib_desc())
    print("Arch: %s" % system.get_arch())
    print("Hostname: %s" % system.get_hostname())
예제 #2
0
def capabilities():
    """Test capabilities functions in new distrition
    For openwrt:
      mv /etc/banner /etc/banner.disable
      fab -s "/bin/ash -l -c" capabilities
    """

    print("SYSTEM")
    print("======")
    print("Distribution: %s" % system.distrib_id())
    print("Release: %s" % system.distrib_release())
    print("Codename: %s" % system.distrib_codename())
    print("Desc: %s" % system.distrib_desc())
    print("Arch: %s" % system.get_arch())
    print("Hostname: %s" % system.get_hostname())
예제 #3
0
파일: system.py 프로젝트: ianjw11/fabtools
def hostname(name):
    """
    Require the hostname to have a specific value.
    """
    if get_hostname() != name:
        set_hostname(name)
예제 #4
0
def hostname(name):
    """
    Require the hostname to have a specific value.
    """
    if get_hostname() != name:
        set_hostname(name)
예제 #5
0
def require_isoinstall():
    """
    check if run in the ISO installation
    """
    if system.get_hostname() != "archiso":
        abort("You seem not execute this script on iso install")
예제 #6
0
def require_isoinstall():
    """
    check if run in the ISO installation
    """
    if system.get_hostname() != "archiso":
        abort("You seem not execute this script on iso install")