Beispiel #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())
Beispiel #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())
Beispiel #3
0
def hostname(name):
    """
    Require the hostname to have a specific value.
    """
    if get_hostname() != name:
        set_hostname(name)
Beispiel #4
0
def hostname(name):
    """
    Require the hostname to have a specific value.
    """
    if get_hostname() != name:
        set_hostname(name)
Beispiel #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")
Beispiel #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")