- [ -z "$SCRIPTS" ] && SCRIPTS='grml.sh'
- einfo "Bootparameter scripts found. Trying to execute ${SCRIPTS}:"
- sh -c "${LIVECD_PATH}"/scripts/$SCRIPTS ; eend $?
+ if [ -z "$SCRIPTS" ]; then
+ SCRIPTS="$(cd ${DCSDIR}/scripts; /bin/ls -1d [Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)"
+ fi
+ if ! echo $SCRIPTS | grep -q '/'; then
+ # backwards compatibility: if no path is given get scripts from scripts/
+ SCRIPTS="scripts/$SCRIPTS"
+ fi
+ SCRIPTS="${DCSDIR}/$SCRIPTS"
+ if [ -d "$SCRIPTS" ]; then
+ einfo "Bootparameter scripts found. Trying to execute from directory ${SCRIPTS}:"
+ run-parts $SCRIPTS
+ else
+ einfo "Bootparameter scripts found. Trying to execute ${SCRIPTS}:"
+ sh -c $SCRIPTS
+ fi
+fi
+}
+
+config_config(){
+if checkbootparam 'config' ; then
+ CONFIG="$(getbootparam 'config' 2>>$DEBUG)"
+ if [ -z "$CONFIG" ]; then
+ CONFIG="$(cd ${DCSDIR}; ls -1d [Cc][Oo][Nn][Ff][Ii][Gg].[Tt][Bb][Zz] 2>>$DEBUG)"
+ fi
+ if [ -n "$CONFIG" ]; then
+ if [ -d "${DCSDIR}/${CONFIG}" ] ; then
+ einfo "Taking configuration from directory ${DCSDIR}/${CONFIG}"
+
+ cp -a ${DCSDIR}/${CONFIG}/* /
+ elif [ -f "${DCSDIR}/${CONFIG}" ]; then
+ einfo "Extracting configuration from file ${DCSDIR}/${CONFIG}"
+
+ cd /
+ unp ${DCSDIR}/${CONFIG} $EXTRACTOPTIONS ; eend $?
+ else
+ ewarn "Sorry, could not find configuration file or directory ${DCSDIR}/${FILENAME}." ; eend 1
+ fi
+ fi