2007-09-23 08:04:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-09-02 11:12:37 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
2020-03-11 09:07:21 -01:00
|
|
|
## Copyright (C) 2016-2020 The Debian Live team
|
2015-01-04 18:05:39 -01:00
|
|
|
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
|
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
|
|
|
{
|
2020-02-20 05:58:11 -01:00
|
|
|
local FILES
|
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
|
2020-02-20 05:58:11 -01:00
|
|
|
local FILE
|
2020-04-01 08:29:52 +00:00
|
|
|
for FILE in "${@}"; do
|
2020-04-28 17:41:44 +00:00
|
|
|
FILES="${FILES} ${FILE}"
|
|
|
|
FILES="${FILES} ${LB_ARCHITECTURE:+$FILE.$LB_ARCHITECTURE}"
|
|
|
|
FILES="${FILES} ${DISTRIBUTION:+$FILE.$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
|
|
|
{
|
2020-02-20 05:58:11 -01:00
|
|
|
local CONFFILE
|
2014-11-22 20:20:29 -01: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 ()
|
|
|
|
{
|
2020-02-20 05:58:11 -01:00
|
|
|
local CONFFILE
|
2014-11-22 20:20:29 -01:00
|
|
|
for CONFFILE in $(Get_conffiles "${@}")
|
2008-10-22 19:09:11 +00:00
|
|
|
do
|
|
|
|
if [ -f "${CONFFILE}" ]
|
|
|
|
then
|
|
|
|
Echo_file "${CONFFILE}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|