diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-12 20:17:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-12 20:21:13 +0000 |
commit | 4ef156921798938fbfe943ff16edf1d5afee9484 (patch) | |
tree | ebbcae9c072f510b1a5d93c1f0a56020df5374de /main | |
parent | 98aba77e80c763faccc04378ff489e3e7ebc1f1a (diff) | |
download | aports-4ef156921798938fbfe943ff16edf1d5afee9484.tar.bz2 aports-4ef156921798938fbfe943ff16edf1d5afee9484.tar.xz |
main/openrc: misc fixes for firstboot
- disable ssh_pass option
- sshd service is enabled form initramfs so remove depends
- remove firstboot from all runlevels. This should only run once
- remove http and ftp support. Require https.
Diffstat (limited to 'main')
-rw-r--r-- | main/openrc/APKBUILD | 4 | ||||
-rw-r--r-- | main/openrc/firstboot.initd | 15 |
2 files changed, 4 insertions, 15 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index 5f9914af41..7d2da953b2 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD @@ -2,7 +2,7 @@ pkgname=openrc pkgver=0.35.5 _ver=${pkgver/_git*/} -pkgrel=2 +pkgrel=3 pkgdesc="OpenRC manages the services, startup and shutdown of a host" url="https://gitweb.gentoo.org/proj/openrc.git" arch="all" @@ -96,4 +96,4 @@ b04058ec630e19de0bafefe06198dc1bff8c8d5d2c89e4660dd83dda8bb82a76cdb1d8661cce88e4 55df0ac13dac1f215f0c573ac07b150d31232a5204eccfc8941d5af73f91b4535a85d79b7f6514217038ecbe6bffa28cb83fd8d46fd4c596e07103deb8bc8a57 networking.initd 80e43ded522e2d48b876131c7c9997debd43f3790e0985801a8c1dd60bc6e09f625b35a127bf225eb45a65eec7808a50d1c08a5e8abceafc61726211e061e0a2 modloop.confd d76c75c58e6f4b0801edac4e081b725ef3d50a9a8c9bbb5692bf4d0f804af7d383bf71a73d5d03ed348a89741ef0b2427eb6a7cbf5a9b9ff60a240639fa6ec88 sysfsconf.initd -baee47a6288108e35d78f47873885111fb4fee9fc690c58d0bfb0385b9796d0879b99449c909dbe5b1921733354a85698e92bb5c08f9e4ea6f031b00e86a0240 firstboot.initd" +be0b1c7a73287bd958a3ddf56fee12adc9343adcfe6b6c851d38c4851a6260b28d0e9e4da2edf2c1ac9a1d42e0c7f2e4f2c343aa45539ba469da49ba13b95521 firstboot.initd" diff --git a/main/openrc/firstboot.initd b/main/openrc/firstboot.initd index cc888b351f..4c26a815c8 100644 --- a/main/openrc/firstboot.initd +++ b/main/openrc/firstboot.initd @@ -12,15 +12,8 @@ init_KOPT() { done } -depend() { - keyword -vserver -lxc - init_KOPT - [ -n "$KOPT_ssh_key" ] && need sshd - [ -n "$KOPT_ssh_pass" ] && use sshd -} - - start() { + rm -f /etc/runlevels/*/$RC_SVCNAME init_KOPT local rc=0 ebegin "Starting ${RC_SVCNAME}" @@ -28,17 +21,13 @@ start() { einfo "Fetching ssh keys" mkdir -pm 700 /root/.ssh case "$KOPT_ssh_key" in - http://*|https://*|ftp://*|ftps://*) + https://*|ftps://*) wget -q "$KOPT_ssh_key" -O /root/.ssh/authorized_keys rc=$?;; *) echo "$KOPT_ssh_key" > /root/.ssh/authorized_keys;; esac chmod 600 /root/.ssh/authorized_keys fi - if [ -n "$KOPT_ssh_pass" ]; then - echo "root:$KOPT_ssh_pass" | /usr/sbin/chpasswd - command_args="-o PermitRootLogin=yes" rc-service sshd start --quiet - fi eend $rc } |