From 1722fced721e7e61f0b1b3748a3f253502e62574 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 15 Apr 2019 19:13:44 +0200 Subject: [PATCH] [file] add alpine support --- cdist/conf/type/__file/explorer/stat | 15 +++++++++++++-- docs/changelog | 4 +++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cdist/conf/type/__file/explorer/stat b/cdist/conf/type/__file/explorer/stat index fec0d6f3..a0f35dcc 100755 --- a/cdist/conf/type/__file/explorer/stat +++ b/cdist/conf/type/__file/explorer/stat @@ -1,6 +1,7 @@ #!/bin/sh # # 2013 Steven Armstrong (steven-cdist armstrong.cc) +# 2019 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -33,7 +34,17 @@ mode: %Lp %Sp size: %Dz links: %Dl " "$destination" | awk '/^type/ { print tolower($0); next; } { print; }' - ;; + ;; + alpine) + # busybox stat + stat -c "type: %F +owner: %u %U +group: %g %G +mode: %a %A +size: %s +links: %h +" "$destination" + ;; *) stat --printf="type: %F owner: %u %U @@ -42,5 +53,5 @@ mode: %a %A size: %s links: %h " "$destination" - ;; + ;; esac diff --git a/docs/changelog b/docs/changelog index 55800f25..a6ad0749 100644 --- a/docs/changelog +++ b/docs/changelog @@ -3,9 +3,11 @@ Changelog next: * Type __package: Add __package_apk support (Nico Schottelius) + * Type __file: Add alpine support (Nico Schottelius) + * Type __hostname: Add alpine support (Nico Schottelius) + * Type __locale: Add alpine support (Nico Schottelius) * Type __start_on_boot: Add alpine support (Nico Schottelius) * Type __timezone: Add alpine support (Nico Schottelius) - * Type __hostname: Add alpine support (Nico Schottelius) * Type __start_on_boot: gentoo: check all runlevels in explorer (Nico Schottelius) * New type: __package_apk (Nico Schottelius)