2007-09-23 08:04:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-09-02 11:12:37 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
2012-12-31 22:12:04 -01:00
|
|
|
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
|
2010-09-02 11:12:37 +00:00
|
|
|
##
|
2012-07-29 23:59:00 +00:00
|
|
|
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
2010-09-02 11:12:37 +00:00
|
|
|
## This is free software, and you are welcome to redistribute it
|
|
|
|
## under certain conditions; see COPYING for details.
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2008-10-22 19:08:42 +00:00
|
|
|
Get_conffiles ()
|
2007-09-23 08:04:46 +00:00
|
|
|
{
|
2010-09-07 13:11:20 +00:00
|
|
|
if [ -n "${LB_CONFIG}" ]
|
2008-04-07 10:01:37 +00:00
|
|
|
then
|
2010-09-07 13:11:20 +00:00
|
|
|
FILES="${LB_CONFIG}"
|
2008-04-07 10:01:37 +00:00
|
|
|
else
|
2008-04-07 10:04:35 +00:00
|
|
|
for FILE in ${@}
|
|
|
|
do
|
2012-12-19 09:16:57 -01:00
|
|
|
FILES="${FILES} ${FILE} ${FILE}.${LIVE_IMAGE_ARCHITECTURE} ${FILE}.${DISTRIBUTION}"
|
2010-11-23 08:36:48 -01:00
|
|
|
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||')"
|
|
|
|
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${ARCHITECTURE}"
|
|
|
|
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${DISTRIBUTION}"
|
2008-04-07 10:04:35 +00:00
|
|
|
done
|
2008-04-07 10:01:37 +00:00
|
|
|
fi
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2008-10-22 19:08:42 +00:00
|
|
|
echo ${FILES}
|
|
|
|
}
|
|
|
|
|
2008-10-28 14:26:17 -01:00
|
|
|
Read_conffiles ()
|
2008-10-22 19:08:42 +00:00
|
|
|
{
|
|
|
|
for CONFFILE in Get_conffiles "${@}"
|
2007-11-13 19:09:34 -01:00
|
|
|
do
|
2008-04-07 10:04:35 +00:00
|
|
|
if [ -f "${CONFFILE}" ]
|
2007-09-23 08:04:47 +00:00
|
|
|
then
|
2008-04-07 10:04:35 +00:00
|
|
|
if [ -r "${CONFFILE}" ]
|
2007-11-13 19:09:34 -01:00
|
|
|
then
|
2008-08-11 20:28:54 +00:00
|
|
|
Echo_debug "Reading configuration file %s" "${CONFFILE}"
|
2008-04-07 10:04:35 +00:00
|
|
|
. "${CONFFILE}"
|
2007-11-13 19:09:34 -01:00
|
|
|
else
|
2008-08-11 20:28:54 +00:00
|
|
|
Echo_warning "Failed to read configuration file %s" "${CONFFILE}"
|
2007-11-13 19:09:34 -01:00
|
|
|
fi
|
2007-09-23 08:04:47 +00:00
|
|
|
fi
|
2007-11-13 19:09:34 -01:00
|
|
|
done
|
2007-09-23 08:04:46 +00:00
|
|
|
}
|
2008-10-22 19:09:11 +00:00
|
|
|
|
2008-10-23 11:03:31 +00:00
|
|
|
Print_conffiles ()
|
|
|
|
{
|
2008-10-22 19:09:11 +00:00
|
|
|
for CONFFILE in Get_conffiles "${@}"
|
|
|
|
do
|
|
|
|
if [ -f "${CONFFILE}" ]
|
|
|
|
then
|
|
|
|
Echo_file "${CONFFILE}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|