#!/bin/bash # Licence : GPL v3 # Author: Laurent HUBERT # # Executes each script from scripts dir if they are executable FIRST_BOOT_BASE_DIR=/etc/first-boot FIRST_BOOT_SCRIPTS_DIR=$FIRST_BOOT_BASE_DIR/scripts if [ ! -r /etc/first-boot/.mustrun ] then exit 0 fi cat <&2 exit 1 fi for f in $(ls $FIRST_BOOT_SCRIPTS_DIR/*) do if [ -x $f ] ; then $f $FIRST_BOOT_BASE_DIR status=$? if [ 0 -ne "$status" ] ; then echo "#ERROR# : script $f did not finish with success status !" cat <