Hidden argument passing in simple-cdd
Hi Vagrant,
I've found the source of some of my problems. There is this mechanism
available for setting option values via a "config" file. Since there
were a lot of parameters and some of them did not have supporting
command line options, I used the config file. The problem is that
some of these get passed through to the "debian-cd" script via the
non-exported variable "commandline_opts". The problem with the
scheme is that the behavior is unexpected and the data stuffed into
the file "commandline" is actually arguments to the build-simple-cdd
program, not the arguments for another sub-program buried deep within
the bowels of the debian-cd project. If they happen to correspond,
well and good, but the transcription should be explicit. Anyway,
here's a little chunk of code to add in immediately after processing
options. This will take care of the issue. Note there is no need
of quoting the output of the $() construct. The introduced newlines
will drop out when the whole mess gets echoed into a file. Again,
please, reply directly to me as well as the list since I think some
email manager somewhere does not like gmail.com. Thanks. - Bruce
commandline_opts=$(
test ${#do_mirror} -gt 0 && {
if X"${do_mirror}" = Xfalse ; then
echo --no-do-mirror
else
echo --do-mirror
fi
}
while read o v
do
eval val=\${${v}}
test ${#val} -eq 0 && continue
echo ${o}
done <<- _EOF_
--graphical-installer ISOLINUX_DEFAULT
--serial-console use_serial_console
--qemu use_qemu
--force-preseed force_preseed
_EOF_
while read o v
do
eval val=\${${v}}
test ${#val} -eq 0 && continue
echo ${o} \'${val}\'
done <<- _EOF_
--dist CODENAME
--profiles profiles
--build-profiles build_profiles
--auto-profiles auto_profiles
--local-packages local_packages
--locale locale
--keyboard keyboard
--debian-mirror debian_mirror
--security-mirror security_mirror
--proposed-updates proposed_updates
--mirror-tools mirror_tools
--build-tools build_tools
--kernel-packages kernel_packages
--profiles-udeb-dist profiles_udeb_dist
--extra-udeb-dist extra_udeb_dist
_EOF_
)
Reply to: