libdevuansdk

common library for devuan's simple distro kits
git clone https://git.parazyd.org/libdevuansdk
Log | Files | Refs | Submodules | README | LICENSE

commit 6813aa0b3df3803eb2ce4fdb122f003a0f922b72
parent 2ea6563962e9246541a1b902d894b98cd916fd01
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 12 Oct 2016 21:24:55 +0200

implement enablessh()

Diffstat:
Mzlibs/helpers | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/zlibs/helpers b/zlibs/helpers @@ -121,6 +121,23 @@ EOF sudo -E chroot $werdo /dpkgdivert || zerr } +enablessh() { + fn enablessh + req=(strapdir) + ckreq || return 1 + + cat <<EOF | sudo tee -a ${strapdir}/enssh +#!/bin/sh +sed -i -e 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config +update-rc.d ssh enable +EOF + + dpkgdivert on $strapdir + sudo chmod +x $strapdir/enssh + sudo -E chroot $strapdir /enssh + dpkgdivert off $strapdir +} + silly() { fn silly "$@" local arg1="$1"