úÎaÜ^/      !"#$%&'()*+,- .  Safe-Inferredcalls /* but will remove the target and retry if / raises EEXIST.None246M<FIXME: We should really get this value from the mount table.»Return the device represented by a device node, such as /dev/sda2. Returns Nothing if there is an exception trying to stat the node, or if the node turns out not to be a special device.07Removable devices, such as USB keys, are in this group.1LTraverse a directory and return a list of all the (path, fileStatus) pairs. 234 5607819:   324 5607819:NoneBM !Monad transformer to ensure that  proc and &sys are mounted during a computation.# - unmounts all mount points below  belowPath¼ /proc/mounts must be present and readable. Because of the way linux handles changeroots, we can't trust everything we see in /proc/mounts. However, we make the following assumptions: ithere is a one-to-one correspondence between the entries in /proc/mounts and the actual mounts, and©every mount point we might encounter is a suffix of one of the mount points listed in /proc/mounts (because being in a a chroot doesn't affect /proc/mounts.)ñSo we can search /proc/mounts for an entry has the mount point we are looking for as a substring, then add the extra text on the right to our path and try to unmount that. Then we start again since nested mounts might have been revealed.öFor example, suppose we are chrooted into /home/david/environments/sid and we call "umountBelow /proc". We might see the mount point /home/david/environments/sid/proc/bus/usb in /proc/mounts, which means we need to run "umount /proc/bus/usb". See also: ;;?umountSucceeded - predicated suitable for filtering results of <<0 - unescape function for strings in /proc/mounts==# - /proc/mount style string escaperP - run umount with the specified args NOTE: this function uses exec, so you do not need to shell-escape NOTE: we don't use the umount system call because the system call is not smart enough to update /etc/mtaboDo an IO task with a file system remounted using mount --bind. This was written to set up a build environment.Mount  proc and ösys in the specified build root and execute a task. Typically, the task would start with a chroot into the build root. If the build root given is "/" it is assumed that the file systems are already mounted, no mounting or unmounting is done.XDo an IO task with /tmp remounted. This could be used to share /tmp with a build root.>Lazy (umount -l flag) if truecanonicalised, absolute pathTpaths that we attempted to umount, and the responding output from the umount command;<=?@A >;<=?@ANoneDeprecated: Use UData.ByteString.Lazy.Char8.readFile path >>= return . show . Data.Digest.Pure.MD5.md5Deprecated: Use aData.ByteString.Lazy.Char8.readFile path >>= Data.ByteString.Lazy.Char8.writeFile (path ++ ".gz") Safe-InferredM OKill the processes whose working directory is in or under the given directory.     Safe-Inferred !GConcatenate two paths, making sure there is exactly one path separator."Use dropFileName#Use takeFileName$resolve all references to ., .., extra slashes, and symlinksB!"#$!"#$"#$!B!"#$ Safe-Inferred M%LTraverse a directory and return a list of all the (path, fileStatus) pairs.Cÿ¬Traverse a file system directory applying D to every directory, F to every non-directory file, and M to every mount point. NOTE: It is tempting to use the "find" function to returns a list of the elements of the directory and then map that list over an "unmount and remove" function. However, because we are unmounting as we traverse, the contents of the file list may change in ways that could confuse the find function.&ÿMRecursively remove a directory contents on a single file system. The adjective "Safely" refers to these features: 1. It will not follow symlinks 2. If it finds a directory that seems to be a mount point, it will attempt to unmount it up to five times. If it still seems to be a mount point it gives up 3. It doesn't use procBmounts, which is ambiguous or wrong when you are inside a chroot.'°Like removeRecursiveSafely but doesn't remove any files, just unmounts anything it finds mounted. Note that this can be much slower than Mount.umountBelow, use that instead.(\Rename src to dst, and if dst already exists move it to dst~. If dst~ exists it is removed.)Htemporarily change the working directory to |dir| while running |action|*ÿ]create a temporary directory, run the action, remove the temporary directory the first argument is a template for the temporary directory name the directory will be created as a subdirectory of the directory returned by getTemporaryDirectory the temporary directory will be automatically removed afterwards. your working directory is not altered D%C&'()*+%&'()*+%&'()*+ D%C&'()*+(c) 2010BSD3jeremy@seereason.com provisionalnon-portable (requires POSIX) Safe-Inferred ,calls crypt(3) E,keysaltencrypted password,,E,  Safe-Inferred F chroot changes the root directory to filepath NOTE: it does not change the working directory, just the root directory NOTE: will throw IOError if chroot fails-ÿ'fchroot runs an IO action inside a chroot fchroot performs a chroot, runs the action, and then restores the original root and working directory. This probably affects the chroot and working directory of all the threads in the process, so... NOTE: will throw IOError if internal chroot fails.¿The ssh inside of the chroot needs to be able to talk to the running ssh-agent. Therefore we mount --bind the ssh agent socket dir inside the chroot (and umount it when we exit the chroot.GHIF-.-.-.GHIF-.J     !"#$%&'()*+,-./0123456 7 89:;<=>?@ABCDEFGHI JKLMNOP Q R S TUUnixutils-1.54.1System.Unix.FilesSystem.Unix.SpecialDeviceSystem.Unix.MountSystem.Unix.MiscSystem.Unix.KillByCwdSystem.Unix.FilePathSystem.Unix.DirectorySystem.Unix.CryptSystem.Unix.ChrootforceSymbolicLink SpecialDevice sysMountPointofPathrootPartofNode ofNodeStatus ofSysName ofSysPath ofMajorMinorofDevNotoDevnonodenodes splitPart diskOfPartsysNamesysDir getAllDisksgetAllPartitions getAllCdromsgetAllRemovableWithProcAndSysrunWithProcAndSys umountBelowumount isMountPoint withMountwithProcAndSyswithTmpmd5sumgzip killByCwd<++>dirNamebaseNamerealpathfindremoveRecursiveSafelyunmountRecursiveSafelyrenameFileWithBackupwithWorkingDirectorywithTemporaryDirectorymkdtempcryptfchrootuseEnv unix-2.7.0.1System.Posix.FilescreateSymbolicLink floppyGroupdirectory_findCharacterDevice BlockDeviceparseSysDevFile diskGroup cdromGroupgetDisksInGroupisPartdirnamebasenameumountSucceededunescapeescape readProcess$fMonadIOWithProcAndSys$fMonadTransWithProcAndSys c_realpathtraverse c_mkdtempc_cryptchrootc_chroot forceList forceList'