[archiso2dual] Modify behaviour of -S parameter

This allow to have syslinux.cfg splited in multiple .cfg files.

Curretly:   -S /path/to/syslinux.cfg
Changed to: -S /path/where/are/syslinux.cfgs.files/

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2010-10-17 18:02:54 -03:00
parent af66220c75
commit f13952761b
2 changed files with 11 additions and 9 deletions

View File

@ -2,9 +2,9 @@ all:
install: all install: all
install -D -m 755 archiso2dual $(DESTDIR)/usr/sbin/archiso2dual install -D -m 755 archiso2dual $(DESTDIR)/usr/sbin/archiso2dual
install -d -m 755 $(DESTDIR)/usr/share/archiso2dual/ install -d -m 755 $(DESTDIR)/usr/share/archiso2dual/syslinux
install -D -m 644 isomounts $(DESTDIR)/usr/share/archiso2dual/isomounts install -D -m 644 isomounts $(DESTDIR)/usr/share/archiso2dual/isomounts
install -D -m 644 syslinux.cfg $(DESTDIR)/usr/share/archiso2dual/syslinux.cfg install -D -m 644 syslinux.cfg $(DESTDIR)/usr/share/archiso2dual/syslinux/syslinux.cfg
install -D -m 644 removefiles.lst $(DESTDIR)/usr/share/archiso2dual/removefiles.lst install -D -m 644 removefiles.lst $(DESTDIR)/usr/share/archiso2dual/removefiles.lst
uninstall: uninstall:

View File

@ -17,7 +17,7 @@ quiet="y"
profile_type="basic" profile_type="basic"
work_dir="/tmp/archiso2dual" work_dir="/tmp/archiso2dual"
isomounts_file="/usr/share/archiso2dual/isomounts" isomounts_file="/usr/share/archiso2dual/isomounts"
syslinuxcfg_file="/usr/share/archiso2dual/syslinux.cfg" syslinuxcfg_dir="/usr/share/archiso2dual/syslinux"
removefiles_file="/usr/share/archiso2dual/removefiles.lst" removefiles_file="/usr/share/archiso2dual/removefiles.lst"
compression="gzip" compression="gzip"
appname=${0##*/} appname=${0##*/}
@ -62,7 +62,9 @@ syslinux_copy() {
syslinuxcfg_copy() { syslinuxcfg_copy() {
echo "Executing: ${FUNCNAME}" echo "Executing: ${FUNCNAME}"
sed "s|XXX|${label}|g" ${syslinuxcfg_file} > $work_dir/iso/boot/syslinux/syslinux.cfg for _cfg in ${syslinuxcfg_dir}/*.cfg; do
sed "s|XXX|${label}|g" ${_cfg} > $work_dir/iso/boot/syslinux/$(basename ${_cfg})
done
} }
isomounts_copy() { isomounts_copy() {
@ -225,7 +227,7 @@ show_help()
echo " -M <isomounts> Path to isomounts file echo " -M <isomounts> Path to isomounts file
(default to '${isomounts_file}'" (default to '${isomounts_file}'"
echo " -S <syslinux> Path to syslinux.cfg file echo " -S <syslinux> Path to syslinux.cfg file
(default to '${syslinuxcfg_file}'" (default to '${syslinuxcfg_dir}'"
echo " -R <removefiles> Path to removefiles file echo " -R <removefiles> Path to removefiles file
(default to '${removefiles_file}'" (default to '${removefiles_file}'"
echo " -w <workdir> Set work directory echo " -w <workdir> Set work directory
@ -260,7 +262,7 @@ show_config() {
echo " source iso x86_64 image: ${isofile_x86_64}" echo " source iso x86_64 image: ${isofile_x86_64}"
echo " target iso image: ${imgname}" echo " target iso image: ${imgname}"
echo " isomounts file: ${isomounts_file}" echo " isomounts file: ${isomounts_file}"
echo " syslinux.cfg file: ${syslinuxcfg_file}" echo " syslinux.cfg path: ${syslinuxcfg_dir}"
echo " removefiles.lst file: ${removefiles_file}" echo " removefiles.lst file: ${removefiles_file}"
echo " working directory: ${work_dir}" echo " working directory: ${work_dir}"
echo " profile: ${profile_type}" echo " profile: ${profile_type}"
@ -318,8 +320,8 @@ sanity_check() {
_error="1" _error="1"
fi fi
if [ ! -f "${syslinuxcfg_file}" ]; then if [ ! -f "${syslinuxcfg_dir}/syslinux.cfg" ]; then
echo "*ERROR*: ${syslinuxcfg_file} does not exist, specify one with -S option" echo "*ERROR*: ${syslinuxcfg_dir}/syslinux.cfg does not exist, specify one with -S option"
_error="1" _error="1"
fi fi
@ -354,7 +356,7 @@ while getopts '3:6:o:T:M:S:R:L:P:A:c:yvh' arg; do
esac esac
;; ;;
M) isomounts_file="${OPTARG}" ;; M) isomounts_file="${OPTARG}" ;;
S) syslinuxcfg_file="${OPTARG}" ;; S) syslinuxcfg_dir="${OPTARG}" ;;
R) removefiles_file="${OPTARG}" ;; R) removefiles_file="${OPTARG}" ;;
L) label="${OPTARG}" ;; L) label="${OPTARG}" ;;
P) publisher="${OPTARG}" ;; P) publisher="${OPTARG}" ;;