5B      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef g h i j k l m n o p q r s t u v w x y z { | } ~  calls ) but will remove the target and retry if   raises EEXIST. =FIXME: We should really get this value from the mount table.  8Return the device represented by a device node, such as /dev/sda2. F Returns Nothing if there is an exception trying to stat the node, or 3 if the node turns out not to be a special device. 8Removable devices, such as USB keys, are in this group. 9Traverse a directory and return a list of all the (path,  fileStatus) pairs.      non-portable (requires POSIX) provisionaljeremy@seereason.com Entry returned by  TODO: add other fields $Textual name of this user (pw_name) APassword -- may be empty or fake if shadow is in use (pw_passwd) getSUserEntryForName name calls getspnam to obtain  the  SUserEntry, information associated with the user login  name.p ' !5Set the indentation string for the generated output. "4Set the verbosity level. This value can be queried 9 using the verbosity function, but is not otherwise used % by the -- functions in this module. #.If true print the elapsed time on termination $1If true, echo the shell command before beginning %,Type of output to generate during execution &Message printed on failure '*Message printed on successful termination (,Message printed before the execution begins )*Print nothing. +0Print an ellipsis (...) when the command starts  and then done. when it finishes. ,2Print a dot for every 1024 characters the command  outputs -Print all the command's output with each line ( indented using (by default) the string ' > '. .@Create a task that sends its output to a handle and then can be ? terminated using an IO operation that returns an exit status. ' Throws an error if the command fails. /012Remove styles by class 3*Add styles, replacing old ones if present 4Singleton case of setStyles 5Singleton case of addStyles 67Add styles only if not present 89:;;The timeDiffToString function returns the empty string for 6 the zero time diff, this is not the behavior I need. < !"#$%&'()*+,-./0123456789:;<./ ('&%$#"!:)-,+*0169347528<; ('&%$#"!!"#$%&'()-,+**+,-./0123456789:;<!BAn opaque type would give us additional type safety to ensure the  semantics of I. =AThe lazyCommand, lazyProcess and lazyRun functions each return a  list of =2. There will generally be one Result value at or 4 near the end of the list (if the list has an end.) >?@AThis is the type returned by  et. al. B>Kill the processes whose working directory is in or under the  given directory. CCreate a process with  and run it with E. DCreate a process with  and run it with E. E%Take the tuple like that returned by , C create a process, send the list of inputs to its stdin and return  the lazy list of = objects. @Wait until at least one handle is ready and then write input or D read output. Note that there is no way to check whether the input C handle is ready except to try to write to it and see if any bytes @ are accepted. If no input is accepted, or the input handle is B already closed, and none of the output descriptors are ready for . reading the function sleeps and tries again. 6Return the next output element and the updated handle ' from a handle which is assumed ready. F6Filter everything except stdout from the output list. G6Filter everything except stderr from the output list. H;Filter the exit codes output list and merge the two output # streams in the order they appear. IBFilter everything except the exit code from the output list. See  discussion in E, of why we are confident that the list will  contain exactly one >. An opaque type to hold the = ) list would lend additional safety here. J3This belongs in Data.ByteString. See ticket 1070,   /http://hackage.haskell.org/trac/ghc/ticket/1070. KLMNO<Turn all the Stdout text into Stderr, preserving the order. P<Turn all the Stderr text into Stdout, preserving the order. Q!Split out and concatenate Stdout R!Split out and concatenate Stderr SNSplit out and concatenate both Stdout and Stderr, leaving only the exit code. T,Collect all output, unpack and concatenate. U*Partition the exit code from the outputs. =>?@ABCDEFGHIJKLMNOPQRSTUA=@?>ECDFGHKLMNOPQRSTUIJB=@?>>?@ABCDEFGHIJKLMNOPQRSTUVV# - unmounts all mount points below  belowPath  /proc/9mounts must be present and readable. Because of the way " linux handles changeroots, we can't trust everything we see in  /proc/5mounts. However, we make the following assumptions:  = there is a one-to-one correspondence between the entries in  /proc/"mounts and the actual mounts, and A (2) 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 5 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:  canonicalised, absolute path Upaths that we attempted to umount, and the responding output from the umount command ?umountSucceeded - predicated suitable for filtering results of V $ - unescape function for strings in /proc/mounts  - /proc/mount stytle string escaper WW& - run umount with the specified args * NOTE: this function uses exec, so you do not need to shell-escape  NOTE: we don'5t use the umount system call because the system call  is not smart enough to update /etc/mtab XVWXVWXVWXYZ[\]^4Echo the process arguments and then run the process _YZ[\]^_YZ[\]^_YZ[\]^_``6 - run a process returning (stdout, stderr, exitcode) Warning9 - stdout and stderr will be read strictly so that we do B not deadlock when trying to check the exitcode. Do not try doing  something like, simpleProcess ["yes"] >NOTE: this may still dead-lock because we first strictly read D outStr and then errStr. Perhaps we should use forkIO or something? abcde`abcde`abcde`abcde 7fBThe flags that control what type of output will be sent to stdout A and stderr. Also, the ExceptionOnFail flag controls whether an ! exception will be thrown if the ExitCode is not  ExitSuccess. ghijklmnopq<A monad for controlling progress reporting of subprocesses. r:Create a function that returns the flags used for a given  quietness level. s>Run the Progress monad with the given flags. The flag set is + compute from the current quietness level, <= 0 the most verbose  and >= 3 the least. The progress task to be run tuv@Look for occurrences of -v and -q in the command line arguments ? and the current values of environment variables VERBOSITY and A QUIETNESS to compute a new value for QUIETNESS. If you want to ( ignore the current QUIETNESS value say setQuietness 0 >>  computeQuietness. >Look at the number of -v and -q arguments to get the baseline  quietness /) verbosity level for progress reporting. w/Perform a task with the given quietness level. x=Do an IO task with additional -v or -q arguments so that the 2 progress reporting becomes more or less verbose. Inject a command'<s output into the Progress monad, handling command echoing, E output formatting, result code reporting, and exception on failure. >Print one dot to stderr for every COUNT characters of output. GAdd prefixes to the output stream after every newline that is followed + by additional text, and at the beginning CPrint all the output to the appropriate output channel. Each pair C is the original input (to be returned) and the modified input (to  be printed.) =Print all the error output to the appropriate output channel y>Run a task and return the elapsed time along with its result. zGPerform a task, print the elapsed time it took, and return the result. {Send a string to stderr. |ePutStr with a terminating newline. }AIf the current quietness level is less than one print a message. # Control the quietness level using quieter. ~qPutStr with a terminating newline. <Print a message and return the second argument unevaluated. eMessage with a terminating newline. eMessage$ controlled by the quietness level. qMessage with a terminating newline.  Unit tests. +fghijklmnopqrstuvwxyz{|}~+qfponmlkjihgrstuvwxyz{|}~+f ponmlkjihgghijklmnopqrstuvwxyz{|}~  HConcatenate two paths, making sure there is exactly one path separator. Use dropFileName Use takeFileName resolve all references to ., .., extra slashes, and symlinks  9Traverse a directory and return a list of all the (path,  fileStatus) pairs. BTraverse 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 A of the elements of the directory and then map that list over an  unmount and remove/ function. However, because we are unmounting B as we traverse, the contents of the file list may change in ways ' that could confuse the find function. ARecursively 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, 8 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 proc$mounts, which is ambiguous or wrong  when you are inside a chroot. $Like removeRecursiveSafely but doesn't remove any files, just A unmounts anything it finds mounted. Note that this can be much 2 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. Itemporarily change the working directory to |dir| while running |action| Mcreate a temporary directory, run the action, remove the temporary directory C the first argument is a template for the temporary directory name d the directory will be created as a subdirectory of the directory returned by getTemporaryDirectory C the temporary directory will be automatically removed afterwards. ' your working directory is not altered  non-portable (requires POSIX) provisionaljeremy@seereason.comcalls crypt(3) key salt encrypted password  !"#$%&'()*+,--./01234567896:;<=>?@ABCDEFGHIJKL6MNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst u v w x y z M { | < 5 } ~  L   Unixutils-1.36System.Unix.ProcessSystem.Unix.OldProgressSystem.Unix.FilesSystem.Unix.SpecialDeviceSystem.Unix.ShadowSystem.Unix.MountSystem.Unix.ProcessExtraSystem.Unix.ProcessStrictSystem.Unix.ProgressSystem.Unix.MiscSystem.Unix.FilePathSystem.Unix.DirectorySystem.Unix.CryptbaseGHC.IO.Exception ExitSuccess ExitFailureExitCodeold-time-1.0.0.6 System.Time noTimeDiffTimeDiffforceSymbolicLink SpecialDevice sysMountPointofPathrootPartofNode ofNodeStatus ofSysName ofSysPath ofMajorMinorofDevNotoDevnonodenodes splitPart diskOfPartsysNamesysDir getAllDisksgetAllPartitions getAllCdromsgetAllRemovable SUserEntry sUserName sUserPasswordgetSUserEntryForNameStyleIndent VerbosityElapsedEchoOutputErrorFinishStartQuietDoneDotsIndented systemTask otherTaskmsgmsgLn removeStyle setStylessetStyleaddStyleoutput addStyles stripDist verbosity readStylefixedTimeDiffToString showElapsedResultStderrStdoutProcess killByCwd lazyCommand lazyProcesslazyRun stdoutOnly stderrOnly outputOnly exitCodeOnlyhPutNonBlocking checkResult discardStdout discardStderr discardOutput mergeToStderr mergeToStdout collectStdout collectStderr collectOutputcollectOutputUnpacked collectResult umountBelowumount isMountPoint cmdOutputcmdOutputStricttoLazytoStrict echoCommand echoProcess ePutStrBl simpleProcess processResult processOutput simpleCommand commandResult commandOutput ProgressFlagExceptionOnFail ResultOnFail ErrorsOnFail AllOnFail EchoOnFailErrorsAllProgressquietnessLevels runProgress lazyCommandP lazyProcessPdefaultQuietness modQuietnessquietertimeTaskePutStr ePutStrLnqPutStr qPutStrLneMessage eMessageLnqMessage qMessageLntests defaultLevels lazyCommandV lazyProcessV lazyCommandF lazyProcessF lazyCommandE lazyProcessE lazyCommandEF lazyProcessEF lazyCommandD lazyCommandQ lazyCommandS lazyCommandSFmd5sumgzip<++>dirNamebaseNamerealpathfindremoveRecursiveSafelyunmountRecursiveSafelyrenameFileWithBackupwithWorkingDirectorywithTemporaryDirectorymkdtempcrypt unix-2.4.2.0System.Posix.FilescreateSymbolicLinkCharacterDevice BlockDeviceparseSysDevFile diskGroup cdromGroup floppyGroupgetDisksInGroupisPartdirectory_find c_getspnam_rCSpwdunpackSUserEntryisERANGEdoubleAllocWhile pwBufSizethrowErrorIfNonZero_ putIndent startMessageprogressOutput finishMessage errorMessageindentelapsed isSublistOfmapSndePut Readyness EndOfFileUnreadyReadyOutputsprocess-1.0.1.5System.ProcessrunInteractiveProcessrunInteractiveCommandhReady'readynextOutumountSucceededunescapeescape ProgressState quietness doProgress dotOutputprefixes printOutput printErrors formatTime'flagsflagsFflagsEflagsEF c_realpath c_mkdtemptraversec_crypt