
Linux From Scratch - Version 7.0
247
if [ ! -x ${i} ]; then
log_warning_msg "${i} is not executable, skipping."
continue
fi
}
function run()
{
if [ -z $interactive ]; then
${1} ${2}
return $?
fi
while true; do
read -p "Run ${1} ${2} (Yes/no/continue)? " -n 1 runit
echo
case ${runit} in
c | C)
interactive=""
${i} ${2}
ret=${?}
break;
;;
n | N)
return 0
;;
y | Y)
${i} ${2}
ret=${?}
break
;;
esac
done
return $ret
}
# Read any local settings/overrides
[ -r /etc/sysconfig/rc.site ] && source /etc/sysconfig/rc.site
DISTRO=${DISTRO:-"Linux From Scratch"}
DISTRO_MINI=${DISTRO_MINI:-"LFS"}
# These 3 signals will not cause our script to exit
trap "" INT QUIT TSTP
[ "${1}" != "" ] && runlevel=${1}
if [ "${runlevel}" = "" ]; then
echo "Usage: ${0} <runlevel>" >&2
exit 1
fi
Comentarios a estos manuales