diff --git a/app-admin/admincd-autoinstall/Manifest b/app-admin/admincd-autoinstall/Manifest new file mode 100644 index 0000000..40061e3 --- /dev/null +++ b/app-admin/admincd-autoinstall/Manifest @@ -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 diff --git a/app-admin/admincd-autoinstall/admincd-autoinstall-1.0.ebuild b/app-admin/admincd-autoinstall/admincd-autoinstall-1.0.ebuild new file mode 100644 index 0000000..2d751ba --- /dev/null +++ b/app-admin/admincd-autoinstall/admincd-autoinstall-1.0.ebuild @@ -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 +} diff --git a/app-admin/admincd-autoinstall/files/init.d.autoinstall-r1 b/app-admin/admincd-autoinstall/files/init.d.autoinstall-r1 new file mode 100755 index 0000000..6653152 --- /dev/null +++ b/app-admin/admincd-autoinstall/files/init.d.autoinstall-r1 @@ -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 +} diff --git a/app-admin/admincd-autoinstall/files/run-autoinstall.sh b/app-admin/admincd-autoinstall/files/run-autoinstall.sh new file mode 100755 index 0000000..b39c17e --- /dev/null +++ b/app-admin/admincd-autoinstall/files/run-autoinstall.sh @@ -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