我想知道是否有可能在预先设定的文件中一起pipe理命令。
就像是:
di preseed/late_command string yes N | apt-get install package -y
(我意识到这是一个不好的例子,我只是想知道它是否会工作。)
我在最后阶段这样做,这些例子给你一个想法:
di 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;
因此,目标文件系统默认位于/ target,您可以四处移动,复制和删除文件,编辑文件,如果要在目标文件系统中运行命令,则在命令前使用“in-target”。
有关更多文档,请参阅: http : //di.alioth.debian.org/manual/en.amd64/apbs05.html#preseed-hooks