Line 408: |
Line 408: |
| %end | | %end |
| | | |
− | =====More Information===== | + | =====More Information and Examples of Usage===== |
| *In the worst case you can base the whole livecd on Fedora 12 packages with this definition: | | *In the worst case you can base the whole livecd on Fedora 12 packages with this definition: |
| # not really rawhide, overriden with F12 'released' repo | | # not really rawhide, overriden with F12 'released' repo |
Line 418: |
Line 418: |
| :Add and or remove programs | | :Add and or remove programs |
| ::Any Program with a minus sign (-) will be removed; any program without a minus will be added | | ::Any Program with a minus sign (-) will be removed; any program without a minus will be added |
| + | |
| * %post | | * %post |
| :Manipulate files that have been installed | | :Manipulate files that have been installed |
| ::%post command are done in ''cheroot'' (the commands are only run against the new file system created for the live CD) | | ::%post command are done in ''cheroot'' (the commands are only run against the new file system created for the live CD) |
− | :'''EXAMPLE''':edit the boot parameters | + | :'''EXAMPLE''' |
− | ::delete "quiet" and "rhgb" add the following line in the %post --nochroot section: | + | ::edit the boot parameters |
| + | :'''delete "quiet" and "rhgb" ''' |
| + | ::add the following line in the %post --nochroot section: |
| + | %post --nochroot |
| sed -i -e '/ *append / { s/quiet// ; s/rhgb//; }' "${LIVE_ROOT}"/isolinux/isolinux.cfg | | sed -i -e '/ *append / { s/quiet// ; s/rhgb//; }' "${LIVE_ROOT}"/isolinux/isolinux.cfg |
| + | |
| + | :'''EXAMPLE''' |
| + | :: Include Documents in Books directory |
| + | %post --nochroot |
| + | # Mel's Example starts (thanks to Mel Chua) |
| + | # pull and include sample content |
| + | WD=$PWD |
| + | CACHE_DIR=$WD/../cache/books |
| + | CONTENT_DIR=$INSTALL_ROOT/home/liveuser/Books |
| + | mkdir -p $CACHE_DIR |
| + | mkdir -p $CONTENT_DIR |
| + | cd $CONTENT_DIR |
| + | PDF="$PDF http://en.flossmanuals.net/ActivitiesGuideSugar/FM_25Apr10.pdf" |
| + | PDF="$PDF http://people.sugarlabs.org/sdz/Sugar_on_a_Stick-3-Creation_Kit-en-US.pdf" |
| + | PDF="$PDF http://people.sugarlabs.org/sdz/Sugar_on_a_Stick-3-Customization_Guide-en-US.pdf" |
| + | for pdf in $PDF ; do |
| + | remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $pdf | tail -1)) |
| + | file=$CACHE_DIR/$remote_file |
| + | if [ ! -f $file ] ; then |
| + | curl -s -4 -L $pdf > $file |
| + | fi |
| + | cp -p $file $CONTENT_DIR |
| + | done |
| + | # make sure to grab education bookmarks |
| + | curl -s -4 -L https://fedorahosted.org/education/export/6c52ad9a365bddbcbaaa034d06aa49a3a7ed0854/bookmarks/default-bookmarks.html > $INSTALL_ROOT/usr/share/bookmarks/default-bookmarks.html |
| + | cd $WD |
| + | %end |
| | | |
| *To change repository: (eg: enable rawhide) | | *To change repository: (eg: enable rawhide) |