add autoinstall ebuild

This commit is contained in:
Alexander Miroshnichenko 2020-06-04 20:54:46 +03:00
parent d3f370c8ab
commit a38139bc11
Signed by: alex
GPG Key ID: E93720C6C73A77F4
4 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,3 @@
AUX init.d.autoinstall-r1 300 BLAKE2B 8515329053920bcbf86b80f992f062bb714c3ab6e391084cf56af030a61926019e786fcc71d8481c77a3ae180367e013bcbb62658f48a485aa7daecaf5eb5ec5 SHA512 dbdc47d8cef26b9a6dc121a0a109181c628dcdba6a3f008fd543831fe408f70d5f73983853e7398ad33fa2d0a3c58c39a3632e7436ccbdb40e5583deccf7377a
AUX run-autoinstall.sh 393 BLAKE2B 95c102647087a4ccc3d7ab0440f63a28cacb5a00ae0b0c00887a59b882a2c8d9c52ef526b5eb00e727aab973e1a8893ba42e8147b04f116853f4058d846489c4 SHA512 1ac9aaa875e6e7aa52ae84d892d4c5361435ec9b83bb9e32ccaee061427bef58e22bf5ee1781ff76d5ff0e16fe330146f51d805db664cd89f06d7a87750595a5
EBUILD admincd-autoinstall-1.0.ebuild 417 BLAKE2B c7b05faf9c99743c68fb1ec87ce1a2d80d66f811ab08181fca90f0d9d2c57ecc486d1fec76fcf1137c71ca7aa95a694cd509393c6bfcbb3e6afe10885f64c775 SHA512 71b33ac9774cd4abc5df4241dd35348d0f32433a2f9bd7786a28f1d99f670980113da68d39412ee6eb8b90b9b5d0f0a9c7fd1fe5d7b4190c605389b51da41612

View File

@ -0,0 +1,24 @@
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Unattended installation support for Admin CD"
HOMEPAGE=""
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
S=${WORKDIR}
src_install() {
newinitd "${FILESDIR}/init.d.autoinstall-r1" autoinstall
dosbin ${FILESDIR}/run-autoinstall.sh
}

View File

@ -0,0 +1,12 @@
#!/sbin/openrc-run
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="autoinstall daemon"
description="Unattended installation support for Admin CD"
command=/usr/sbin/run-autoinstall.sh
command_args="${autoinstall_args}"
depend() {
need net
}

View File

@ -0,0 +1,22 @@
#!/bin/bash
# get_bootparam_val() {
# # We're given something like:
# # foo=bar=cow
# # Return the "bar=cow" part.
# case $1 in
# *=*)
# ;;
# esac
# }
for x in $(cat /proc/cmdline); do
case "${x}" in
autoinstall=*) AUTOINSTALL_PATH="${x#*=}"
;;
esac
done
if [ -n "${AUTOINSTALL_PATH}" ]; then
curl -sfL "${AUTOINSTALL_PATH}" | sh -
fi