diff --git a/LICENSE.md b/LICENSE.md
index 250cdd5..0535628 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,19 +1,7 @@
# Adams license information
Adams - UNIX system administration tool written in Common Lisp
-Copyright 2013,2014,2018,2020 Thomas de Grivel <thoxdg@gmail.com>
-
-Permission to use, copy, modify, and distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
## Adams dependencies license information
@@ -579,40 +567,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-### re
-
-Copyright 2014 Thomas de Grivel <thomas@lowh.net>
-
-Permission to use, copy, modify, and distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-### str
-
-Copyright 2012-2015 Thomas de Grivel <thomas@lowh.net>
-
-Permission to use, copy, modify, and distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
### trivial-utf-8
Copyright (c) Marijn Haverbeke
diff --git a/Makefile b/Makefile
index c507555..4f8385d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+## Adams - UNIX system administration tool written in Common Lisp
+## Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
+
PACKAGE = adams
VERSION = 0.3.2
RELEASE_DIR = ${PACKAGE}-${VERSION}
diff --git a/README.md b/README.md
index c609274..3408ef9 100644
--- a/README.md
+++ b/README.md
@@ -142,37 +142,11 @@ In your main script :
```
-ISC License
------------
-```
-;; Copyright YEAR AUTHOR <EMAIL>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
-```
-
-
-Contribute
-----------
-
-To contribute, fork this repository and send us a pull request.
-
-Please publish under the
-[ISC License](https://en.wikipedia.org/wiki/ISC_license)
-terms.
+[License](LICENSE.md)
+---------------------
Authors
-------
-Thomas de Grivel <thoxdg@gmail.com>
+Thomas de Grivel <thodg@kmx.io>
diff --git a/adams.asd b/adams.asd
index 55be707..00eab78 100644
--- a/adams.asd
+++ b/adams.asd
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(defpackage :adams.system
(:use :cl :asdf))
diff --git a/build.lisp b/build.lisp
index 074ab9d..5f38baf 100644
--- a/build.lisp
+++ b/build.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :common-lisp-user)
diff --git a/config.lisp b/config.lisp
index 207c5fe..c039f50 100644
--- a/config.lisp
+++ b/config.lisp
@@ -1,2 +1,4 @@
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(declaim (optimize (debug 3) (safety 3) (speed 3)))
diff --git a/core/defs.lisp b/core/defs.lisp
index 225e1e8..d2123a1 100644
--- a/core/defs.lisp
+++ b/core/defs.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/helpers.lisp b/core/helpers.lisp
index 4847c7b..8955517 100644
--- a/core/helpers.lisp
+++ b/core/helpers.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/host.lisp b/core/host.lisp
index d74ecc2..5a17214 100644
--- a/core/host.lisp
+++ b/core/host.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/include.lisp b/core/include.lisp
index 7ba658e..da6142a 100644
--- a/core/include.lisp
+++ b/core/include.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/operation.lisp b/core/operation.lisp
index b6659da..76e4ead 100644
--- a/core/operation.lisp
+++ b/core/operation.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/os.lisp b/core/os.lisp
index 54e2a2f..0ffdace 100644
--- a/core/os.lisp
+++ b/core/os.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/probe.lisp b/core/probe.lisp
index 2fc2e8f..c9fc2be 100644
--- a/core/probe.lisp
+++ b/core/probe.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/properties.lisp b/core/properties.lisp
index a232b4b..d97f345 100644
--- a/core/properties.lisp
+++ b/core/properties.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/resource-container.lisp b/core/resource-container.lisp
index b102d5c..43636f4 100644
--- a/core/resource-container.lisp
+++ b/core/resource-container.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/resource.lisp b/core/resource.lisp
index d5ea4e5..a07c641 100644
--- a/core/resource.lisp
+++ b/core/resource.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/spec.lisp b/core/spec.lisp
index b2266c0..13a2853 100644
--- a/core/spec.lisp
+++ b/core/spec.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/core/syntaxes.lisp b/core/syntaxes.lisp
index 60638a9..8b8d6b4 100644
--- a/core/syntaxes.lisp
+++ b/core/syntaxes.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/package.lisp b/package.lisp
index ed3c4e3..efca103 100644
--- a/package.lisp
+++ b/package.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :cl-user)
@@ -146,6 +131,7 @@
#:ssh-authorized-key
#:stat
#:stat<1>
+ #:symlink
#:+timestamp-offset+
#:timestamp-to-universal-time
#:universal-time-to-timestamp
diff --git a/prepare-build.lisp b/prepare-build.lisp
index a94bd53..3c8234a 100644
--- a/prepare-build.lisp
+++ b/prepare-build.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2020 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :common-lisp-user)
@@ -163,10 +148,11 @@
(let (dependencies)
(labels ((dfs (name)
(let ((sys (asdf:find-system name)))
- (when sys
+ (when (and sys (not (find sys dependencies)))
(locally (declare (type asdf:system sys))
+ (format t "~& ~A" sys) (force-output)
(map 'nil #'dfs (asdf:system-depends-on sys))
- (pushnew sys dependencies))))))
+ (push sys dependencies))))))
(dfs name)
(nreverse dependencies))))
diff --git a/shell/sb-shell.lisp b/shell/sb-shell.lisp
index 9abbbee..e7627f9 100644
--- a/shell/sb-shell.lisp
+++ b/shell/sb-shell.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/shell/shell.lisp b/shell/shell.lisp
index 3f3e1cc..c4aa608 100644
--- a/shell/shell.lisp
+++ b/shell/shell.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
@@ -137,7 +122,7 @@ Error: ~S"
(shell-in (format nil " ; echo \"~%~A $?\"~%" delim) shell)
(let* ((prev nil)
(status
- (loop (let ((line (the string (shell-out/line shell))))
+ (loop (let ((line (shell-out/line shell)))
(when (or (null line)
(and (< len (length line))
(string= delim line :end2 len)))
@@ -160,7 +145,7 @@ Error: ~S"
(shell-log shell "| ~A~%" line))
(dolist (line err)
(shell-log shell "# ~A~&" line))
- (unless (= 0 status)
+ (unless (and status (= 0 status))
(shell-log shell " ⇒ ~D~%" status)))
(values status out err))))
diff --git a/test.lisp b/test.lisp
index 7da15f0..e57cce3 100644
--- a/test.lisp
+++ b/test.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :cl-user)
@@ -32,6 +17,11 @@
(adams:clear-resources)
(adams:clear-probed)
+(resource 'symlink "/home/dx/test-symlink"
+ :owner "dx"
+ :group "dx"
+ :target "../test")
+
(resource 'host "ams.kmx.io"
:user "root"
:hostname "ams"
diff --git a/toplevel.lisp b/toplevel.lisp
index 3396cc6..576873b 100644
--- a/toplevel.lisp
+++ b/toplevel.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/commands.lisp b/unix/commands.lisp
index b76ef99..90868f2 100644
--- a/unix/commands.lisp
+++ b/unix/commands.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/darwin.lisp b/unix/darwin.lisp
index 85600b3..0e48d54 100644
--- a/unix/darwin.lisp
+++ b/unix/darwin.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018,2021 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/debian.lisp b/unix/debian.lisp
index a9d3f54..734e4b9 100644
--- a/unix/debian.lisp
+++ b/unix/debian.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/defs.lisp b/unix/defs.lisp
index 580bc09..7bb5065 100644
--- a/unix/defs.lisp
+++ b/unix/defs.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
@@ -94,6 +79,19 @@
(defgeneric op-file-ensure (resource os &key ensure))
(defgeneric op-file-content (resource os &key content))
+;; Symbolic link
+
+(define-resource-class symlink (vnode)
+ ()
+ ((probe-symlink-target :properties (:target)))
+ ((op-symlink-ensure :properties (:ensure))
+ (op-symlink-target :properties (:target)))
+ ((:op-properties (:ensure :target))))
+
+(defgeneric probe-symlink-target (resource os))
+(defgeneric op-symlink-ensure (resource os &key ensure))
+(defgeneric op-symlink-target (resource os &key target))
+
;; Directory
(define-resource-class directory (vnode)
diff --git a/unix/freebsd.lisp b/unix/freebsd.lisp
index 7fb3042..9b34175 100644
--- a/unix/freebsd.lisp
+++ b/unix/freebsd.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/linux.lisp b/unix/linux.lisp
index be4b6b3..4d2f441 100644
--- a/unix/linux.lisp
+++ b/unix/linux.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/openbsd.lisp b/unix/openbsd.lisp
index 168c49a..6ba2960 100644
--- a/unix/openbsd.lisp
+++ b/unix/openbsd.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/operations.lisp b/unix/operations.lisp
index 359a869..fdd219c 100644
--- a/unix/operations.lisp
+++ b/unix/operations.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
@@ -78,7 +63,13 @@
(join-str " "
(ecase ensure
((:absent) "userdel")
- ((:present) "useradd -m")
+ ((:present) `("useradd"
+ ,(unless (eq :present
+ (get-probed
+ (resource 'directory (homedir
+ user))
+ :ensure))
+ "-m")))
((nil) "usermod"))
(when realname `("-c" ,(sh-quote realname)))
(when home `("-d" ,(sh-quote home)))
@@ -184,6 +175,28 @@
(funcall (the function after) res os))
(clear-probed res)))
+;; Symlink
+
+(defmethod op-symlink-ensure ((res symlink) (os os-unix)
+ &key ensure)
+ (sync-owner-and-group res)
+ (sync (parent-directory res))
+ (let* ((id (resource-id res))
+ (sh-id (sh-quote id))
+ (target (get-specified res :target))
+ (sh-target (sh-quote target)))
+ (ecase ensure
+ ((:absent) (run "rm " sh-id))
+ ((:present) (run "ln -s " sh-target " " sh-id))
+ ((nil)))))
+
+(defmethod op-symlink-target ((res symlink) (os os-unix)
+ &key target)
+ (let* ((id (resource-id res))
+ (sh-id (sh-quote id))
+ (sh-target (sh-quote target)))
+ (run "ln -sf " sh-target " " sh-id)))
+
;; Directory
(defmethod op-directory-ensure ((res directory) (os os-unix)
diff --git a/unix/probes.lisp b/unix/probes.lisp
index c4cf2ce..4c62883 100644
--- a/unix/probes.lisp
+++ b/unix/probes.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
@@ -76,10 +61,10 @@
(defmethod probe-vnode-using-ls ((vnode vnode) (os os-unix))
(let ((id (resource-id vnode))
(ensure :absent))
- (multiple-value-bind #1=(mode links owner group size mtime)
+ (multiple-value-bind #1=(mode links owner group size mtime target)
(with-ls<1>-lT #.(cons 'name '#1#)
(ls "-ldT" id)
- (when (string= id name)
+ (when (string= id (the string name))
(setq mode (mode (mode-permissions mode))
owner (resource 'user owner)
group (resource 'group group)
@@ -144,6 +129,14 @@
:file-too-large))))
(properties* content)))
+;; Symlink
+
+(defmethod probe-symlink-target ((symlink symlink) (os os-unix))
+ (let ((target (string-trim '(#\Newline)
+ (run-1 "readlink "
+ (sh-quote (resource-id symlink))))))
+ (properties* target)))
+
;; Directory
(defmethod probe-directory-content ((dir directory) (os os-unix))
diff --git a/unix/ssh.lisp b/unix/ssh.lisp
index f6c3c0a..0dda1af 100644
--- a/unix/ssh.lisp
+++ b/unix/ssh.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/stat.lisp b/unix/stat.lisp
index 3fbd75b..28ec881 100644
--- a/unix/stat.lisp
+++ b/unix/stat.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
diff --git a/unix/syntaxes.lisp b/unix/syntaxes.lisp
index 0e438ce..74b54aa 100644
--- a/unix/syntaxes.lisp
+++ b/unix/syntaxes.lisp
@@ -1,20 +1,5 @@
-;;
-;; adams - system administrator written in Common Lisp
-;;
-;; Copyright 2013,2014,2018 Thomas de Grivel <thoxdg@gmail.com>
-;;
-;; Permission to use, copy, modify, and distribute this software for any
-;; purpose with or without fee is hereby granted, provided that the above
-;; copyright notice and this permission notice appear in all copies.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;;
+;; Adams - UNIX system administration tool written in Common Lisp
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
(in-package :adams)
@@ -41,10 +26,11 @@
group
(#'sh-parse-integer size)
(#'chronicity:parse time)
- name)
- #~|^([-a-zA-Z]{10})\s+([0-9]+)\s+(\S+)\s+(\S+)\s+([0-9]+)\s+(\S+\s+\S+ \S+ \S+)\s+(.+)$|
+ name
+ target)
+ #~|^([-a-zA-Z]{10})\s+([0-9]+)\s+(\S+)\s+(\S+)\s+([0-9]+)\s+(\S+\s+\S+ \S+ \S+)\s+(.+?)(?: -> (.*))?$|
"Syntax for `ls -lT` output. See ls(1)."
- (values name mode links owner group size time))
+ (values name mode links owner group size time target))
(define-syntax stat<1>-r ((#'sh-parse-integer
dev ino mode links uid gid rdev size)