@@ -0,0 +1,1444 @@
+'''%0ASalt module to manage unix mounts and the fstab file%0A'''%0A# Import python libs%0Aimport os%0A%0Adef active():%0A    '''%0A    List the active mounts.%0A%0A    CLI Example:%0A    salt '*' mount.active%0A    '''%0A    ret = %7B%7D%0A    for line in __salt__%5B'cmd.run_stdout'%5D('mount').split('%5Cn'):%0A        comps = line.split()%0A        if not len(comps) == 6:%0A            # Invalid entry%0A            continue%0A        ret%7Bcomps%5B2%5D%7D = %7B'device': comps%5B0%5D,%0A                         'fstype': comps%5B4%5D,%0A                         'opts': comps%5B5%5D%5B1:-1%5D.split(',')%7D%0A    return ret%0A%0Adef fstab(config='/etc/fstab'):%0A    '''%0A    List the contents of the fstab%0A%0A    CLI Example:%0A    salt '*' mount.fstab%0A    '''%0A    ret = %7B%7D%0A    if not os.path.isfile(config):%0A        return ret%0A    for line in open(config).readlines():%0A        if line.startswith('#'):%0A            # Commented%0A            continue%0A        if not line.strip():%0A            # Blank line%0A            continue%0A        comps = line.split()%0A        if not len(comps) == 6:%0A            # Invalid entry%0A            continue%0A        ret%5Bcomps%5B1%5D%5D = %7B'device': comps%5B0%5D,%0A                         'fstype': comps%5B2%5D,%0A                         'opts': comps%5B3%5D.split(','),%0A                         'dump': comps%5B4%5D,%0A                         'pass': comps%5B5%5D%7D%0A    return ret%0A%0Adef mount(name, device, fstype='', opts='defaults'):%0A    '''%0A    Mound a device%0A%0A    CLI Example:%0A    salt '*' mount.mount /mnt/foo /dev/sdz1 %0A    '''%0A

Add mount minion module