Config for Arch live system. Script output to strerr
This commit is contained in:
parent
4c6705a312
commit
b0a1a5867d
|
@ -1,5 +1,8 @@
|
|||
MEMTEST_BIN="/boot/memtest86+.bin"
|
||||
UBUNTU_INSTALL_NETBOOT="http://de.archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/netboot.tar.gz"
|
||||
DEBIAN_INSTALL_NETBOOT="http://ftp.nl.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/netboot.tar.gz"
|
||||
ARCH_BASEDIR="arch/arch"
|
||||
ARCH_BASEDIR="archiso/arch"
|
||||
PXE_HTTP_PORT=80
|
||||
ARCHISO_HTTP_PORT=80
|
||||
LIVE_SSH_ROOTLOGIN="yes"
|
||||
|
||||
|
|
|
@ -6,6 +6,10 @@ LGRAY='\033[0;37m'
|
|||
|
||||
NC='\033[0m'
|
||||
|
||||
[ -z "$ARCHISO_SERVER" ] && ARCHISO_SERVER=${PXE_SERVER}
|
||||
[ -z "$ARCHISO_HTTP_BASE" ] && ARCHISO_HTTP_BASE=${PXE_HTTP_BASE}
|
||||
|
||||
|
||||
requiredir() {
|
||||
[ -n "$1" ] || exit 1
|
||||
[ -e $1 ] || mkdir $1
|
||||
|
@ -31,15 +35,19 @@ endstage() {
|
|||
echo -n "done" > ${WORKDIR}/stage/_$1
|
||||
}
|
||||
|
||||
edebug() {
|
||||
[ "$MKLIVE_DEBUG" == "true" ] && echo "[dd] $1" 1>&2
|
||||
}
|
||||
|
||||
eok() {
|
||||
echo -e "${GREEN}[++] $1${NC}"
|
||||
echo -e "${GREEN}[++] $1${NC}" 1>&2
|
||||
}
|
||||
|
||||
einfo() {
|
||||
echo -e "${BLUE}[ii] ${1}${NC}"
|
||||
echo -e "${BLUE}[ii] ${1}${NC}" 1>&2
|
||||
}
|
||||
|
||||
eerr(){
|
||||
echo -e "${RED}[--] ${1}${NC}"
|
||||
echo -e "${RED}[--] ${1}${NC}" 1>&2
|
||||
}
|
||||
|
||||
|
|
|
@ -221,14 +221,22 @@ then
|
|||
-n -e '/arch64_http/,/^$/p' \
|
||||
${localarchpath}${archbasedir}/boot/syslinux/archiso_pxe.cfg
|
||||
else
|
||||
#echo "http://${PXE_SERVER}${PXE_HTTP_BASE}/${archbasedir}/boot/syslinux/archiso_pxe.cfg" 1>&2
|
||||
curl -s http://${PXE_SERVER}${PXE_HTTP_BASE}/${archbasedir}/boot/syslinux/archiso_pxe.cfg | sed -r \
|
||||
#echo "http://${ARCHISO_SERVER}${ARCHISO_HTTP_BASE}/${archbasedir}/boot/syslinux/archiso_pxe.cfg" 1>&2
|
||||
archiso_pxe_url=http://${ARCHISO_SERVER}:${ARCHISO_HTTP_PORT}${ARCHISO_HTTP_BASE}/${archbasedir}/boot/syslinux/archiso_pxe.cfg
|
||||
edebug "Try to download $archiso_pxe_url"
|
||||
|
||||
curl -s $archiso_pxe_url | sed -r \
|
||||
-e "s~boot~/${archbasedir}/boot~g" \
|
||||
-e "s~basedir=arch~basedir=${PXE_HTTP_BASE}/${ARCH_BASEDIR}~g" \
|
||||
-e "s/\\$\{pxeserver\}/${PXE_SERVER}/g" \
|
||||
-e "s~basedir=arch~basedir=${ARCHISO_HTTP_BASE}/${ARCH_BASEDIR}~g" \
|
||||
-e "s/\\$\{pxeserver\}/${ARCHISO_SERVER}:${ARCHISO_HTTP_PORT}/g" \
|
||||
-e 's/^(APPEND .*)$/\1 ip=dhcp/g' \
|
||||
-e "s/^SYSAPPEND [0-9]+/SYSAPPEND 2/g" \
|
||||
-n -e '/arch64_http/,/^$/p'
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ];
|
||||
then
|
||||
eerr "Failed to download archiso_pxe.cfg"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue