How do I pipe commands together in a debian preseed file?
I do that at the last stage, these are some examples to give you an idea:
d-i preseed/late_command string \
cd /target/etc/apt/; \
wget http://repo.example.com/sources_new.list; \
mv sources_new.list sources.list; \
echo 'Acquire::http::Proxy "http://proxy.example.org";' >> apt.conf; \
ls . > temp; \
cat temp | grep -cq string; \
cd /; \
in-target apt-get update; \
in-target apt-get -y upgrade; \
in-target apt-get -y dist-upgrade; \
in-target tasksel install desktop; \
in-target apt-get -y install sudo \
less \
ssh \
icedove \
lynx \
xscreensaver;
So the target filesystem by default is located at /target and you can move around and copy and delete files, edit files and if you want to run a command in the target filesystem you use "in-target" before the command.
For more documentation see: http://d-i.alioth.debian.org/manual/en.amd64/apbs05.html#preseed-hooks