From 9d0d89cbf1ffc68fb540b31362cb1fdba2b1df7d Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sat, 12 Jun 2021 23:42:34 +0200 Subject: [PATCH] ssh and mkinitcpio fixes --- pkg/de-p1st-mkinitcpio/PKGBUILD | 2 +- pkg/de-p1st-mkinitcpio/mkinitcpio.conf.holoscript | 8 ++++---- pkg/de-p1st-ssh/PKGBUILD | 2 +- pkg/de-p1st-ssh/sshd_config.holoscript | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/de-p1st-mkinitcpio/PKGBUILD b/pkg/de-p1st-mkinitcpio/PKGBUILD index 2577010..581e4e8 100644 --- a/pkg/de-p1st-mkinitcpio/PKGBUILD +++ b/pkg/de-p1st-mkinitcpio/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=mkinitcpio _reponame=arch pkgname="de-p1st-$_pkgname" -pkgver=0.0.8 +pkgver=0.0.9 pkgrel=1 pkgdesc="mkinitcpio configuration" arch=('any') diff --git a/pkg/de-p1st-mkinitcpio/mkinitcpio.conf.holoscript b/pkg/de-p1st-mkinitcpio/mkinitcpio.conf.holoscript index d2ffd78..7a72498 100644 --- a/pkg/de-p1st-mkinitcpio/mkinitcpio.conf.holoscript +++ b/pkg/de-p1st-mkinitcpio/mkinitcpio.conf.holoscript @@ -6,16 +6,16 @@ stdin=$(cat) # assert MODULES is empty -echo "$stdin" | grep '^MODULES=()' +echo "$stdin" | grep --quiet '^MODULES=()' # assert HOOKS is as expected -echo "$stdin" | grep '^HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)' +echo "$stdin" | grep --quiet '^HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)' # assert no COMPRESSION option is enabled yet -! echo "$stdin" | grep '^COMPRESSION=' +! echo "$stdin" | grep --quiet '^COMPRESSION=' # assert lz4 COMPRESSION is uncommented -echo "$stdin" | grep '^#COMPRESSION="lz4"' +echo "$stdin" | grep --quiet '^#COMPRESSION="lz4"' # 1) add to MODULES; 2 replace HOOKS; 3) uncomment lz4 COMPRESSION sed ' diff --git a/pkg/de-p1st-ssh/PKGBUILD b/pkg/de-p1st-ssh/PKGBUILD index 5badb9a..e704c48 100644 --- a/pkg/de-p1st-ssh/PKGBUILD +++ b/pkg/de-p1st-ssh/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=ssh _reponame=arch pkgname="de-p1st-$_pkgname" -pkgver=0.0.2 +pkgver=0.0.3 pkgrel=1 pkgdesc="ssh with configuration" arch=('any') diff --git a/pkg/de-p1st-ssh/sshd_config.holoscript b/pkg/de-p1st-ssh/sshd_config.holoscript index 6162d36..157b331 100644 --- a/pkg/de-p1st-ssh/sshd_config.holoscript +++ b/pkg/de-p1st-ssh/sshd_config.holoscript @@ -5,14 +5,14 @@ # save stdin (content of /etc/ssh/sshd_config) in variable stdin=$(cat) -# asertions +# assertions echo "$stdin" | grep '^UsePAM yes$' # -echo "$stdin" | grep '^#PermitRootLogin\s.*$' -echo "$stdin" | grep '^#PubkeyAuthentication\s.*$' -echo "$stdin" | grep '^#PasswordAuthentication\s.*$' -echo "$stdin" | grep '^#PermitEmptyPasswords\s.*$' -echo "$stdin" | grep '^#X11Forwarding\s.*$' +echo "$stdin" | grep --quiet '^#PermitRootLogin\s.*$' +echo "$stdin" | grep --quiet '^#PubkeyAuthentication\s.*$' +echo "$stdin" | grep --quiet '^#PasswordAuthentication\s.*$' +echo "$stdin" | grep --quiet '^#PermitEmptyPasswords\s.*$' +echo "$stdin" | grep --quiet '^#X11Forwarding\s.*$' sed ' s|^#PermitRootLogin\s.*$|PermitRootLogin no|;