diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-10 19:02:50 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-10 21:49:23 -0700 |
commit | b1b4001db08c9a0b094523df18d287336651eeef (patch) | |
tree | ce0b5e962a73daf3790d496f8b6f16947ffe935f /src/connection.lisp | |
parent | 102214763c91bb4b4f75bccd28f0e481f5eed8f8 (diff) | |
download | consfigurator-b1b4001db08c9a0b094523df18d287336651eeef.tar.gz |
factor out MOUNTPOINTP
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection.lisp')
-rw-r--r-- | src/connection.lisp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index 3105bc6..57b48c6 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -444,6 +444,13 @@ expected." (defun test (&rest args) (zerop (apply #'mrun :for-exit "test" args))) +(defun mountpointp (path) + "Is PATH a mount point? + +Uses mountpoint(1) from util-linux, so add a property requiring OS:LINUX or a +subclass to the :HOSTATTRS subroutine of properties calling this." + (zerop (mrun :for-exit "mountpoint" "-q" path))) + (defun delete-remote-trees (&rest paths) "Recursively delete each of PATHS." (mrun "rm" "-rf" paths)) |