Пример #1
0
def mount_remote_filesystems():
    """Mounts remote filesystems."""
    from pardus.fstabutils import Fstab
    fstab = Fstab()
    if fstab.contains_remote_mounts():
        UI.info(_("Mounting remote filesystems"))
        manage_service("netfs", "start")
Пример #2
0
def mount_remote_filesystems():
    """Mounts remote filesystems."""
    from pardus.fstabutils import Fstab
    fstab = Fstab()
    if fstab.contains_remote_mounts():
        UI.info(_("Mounting remote filesystems"))
        manage_service("netfs", "start")
Пример #3
0
def start():
    # Mount all remote filesystems
    if run("/usr/bin/nm-online -q -t 10") != 0:
        # NM is not running
        fail(MSG_NM_NOT_RUNNING)

    fstab = Fstab()
    for entry in fstab.get_entries():
        if entry.is_remote_mount():
            if entry.is_nfs():
                # Start rpcbind if fs is nfs|nfs4
                startDependencies("rpcbind")
            # Mount it
            entry.mount()
Пример #4
0
def status():
    fstab = Fstab()
    for entry in fstab.get_entries():
        if entry.is_remote_mount() and entry.is_mounted():
            return True
Пример #5
0
def stop():
    # Unmount all remote filesystems
    fstab = Fstab()
    for entry in fstab.get_entries():
        if entry.is_remote_mount():
            entry.unmount()