From 8966351b12bbcf2f8fffbd8c3a4b00e7529349b8 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sat, 6 Sep 2008 20:39:35 -0500 Subject: Split mkarchiso and configs into logical parts Signed-off-by: Aaron Griffin --- configs/install-iso/default-config/etc/archiso/functions | 12 ++++++++++++ configs/install-iso/default-config/etc/archiso/getshell | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 configs/install-iso/default-config/etc/archiso/functions create mode 100644 configs/install-iso/default-config/etc/archiso/getshell (limited to 'configs/install-iso/default-config/etc/archiso') diff --git a/configs/install-iso/default-config/etc/archiso/functions b/configs/install-iso/default-config/etc/archiso/functions new file mode 100644 index 0000000..fdd48f4 --- /dev/null +++ b/configs/install-iso/default-config/etc/archiso/functions @@ -0,0 +1,12 @@ +# vim: set ft=sh: + +cmdline_param () +{ + for param in ${CMDLINE}; do + case "${param}" in + $1=*) echo "${param##*=}"; return ;; + *) continue ;; + esac + done + [ -n "${2}" ] && echo "${2}" +} diff --git a/configs/install-iso/default-config/etc/archiso/getshell b/configs/install-iso/default-config/etc/archiso/getshell new file mode 100644 index 0000000..a6f8775 --- /dev/null +++ b/configs/install-iso/default-config/etc/archiso/getshell @@ -0,0 +1,9 @@ +#!/bin/sh + +. /etc/archiso/functions + +shell="$(cmdline_param shell)" +[ -n "${shell}" ] && shell="/bin/bash" +[ ! -e "${shell}" ] && shell="/bin/sh" + +exec ${shell} -- cgit v1.2.3-70-g09d2