Author: alexander
Date: 2005-11-03 06:23:18 -0700 (Thu, 03 Nov 2005)
New Revision: 1039
Added:
branches/dm/packages/lfs-bootscripts/customize
Modified:
branches/dm/Makefile
branches/dm/doc/README
branches/dm/packages/lfs-bootscripts/Makefile
Log:
Added and documented the possibility to customize the CD
Fixed cleaning targets in the main Makefile
Added a new "zeros" target that zeroes unused sectors for better compression
Modified: branches/dm/Makefile
===================================================================
--- branches/dm/Makefile 2005-11-03 09:06:49 UTC (rev 1038)
+++ branches/dm/Makefile 2005-11-03 13:23:18 UTC (rev 1039)
@@ -582,8 +582,7 @@
@-rm -f $(SRC) $(ROOT) $(LFSSRC)
scrub: clean
- @-for i in bin boot dev etc home iso lib media mnt opt proc root sbin
srv sys tmp \
- usr var ; do rm -rf $(MP)/$$i ; done
+ @-rm root.ext2
@-rm lfslivecd-$(VERSION).iso
clean_sources:
@@ -603,12 +602,14 @@
@-rmdir $(MP)/boot
@-ln -s /dev/shm/.cdrom/boot $(MP)
@-umount $(MP)
- @-touch root.ext2
- @-rm ../iso/root.ext2
+zeroes: $(MP)$(ROOT)
+ -dd if=/dev/zero of=$(MP)/zeroes
+ -rm $(MP)/zeroes
+ -make unmount
.PHONY: unmount clean_sources scrub clean iso chroot-gvim update-fontsdir \
final-environment re-adjust-toolchain ch-% ch-glibc-32
lfs-adjust-toolchain \
lfs-%-scpt lfs-%-scpt-32 lfs-%-pass1 lfs-%-pass2 createfiles \
gvim %-only-ch lfs-%-only lfs-%-only-pass1 lfs-%-only-pass2 lfs-wget \
- lfs-rm-wget blfs post-bash pre-bash tools pre-which
+ lfs-rm-wget blfs post-bash pre-bash tools pre-which zeroes
Modified: branches/dm/doc/README
===================================================================
--- branches/dm/doc/README 2005-11-03 09:06:49 UTC (rev 1038)
+++ branches/dm/doc/README 2005-11-03 13:23:18 UTC (rev 1039)
@@ -92,17 +92,18 @@
instructions below.
* Burn the official CD in multi session mode:
- cdrecord dev=/dev/cdrom -v -multi -tao lfslivecd-x86-1-[version].iso
+ cdrecord dev=/dev/cdrom -v -multi -tao lfslivecd-[version].iso
* Prepare a directory with the files you want to add, delete or change:
mkdir second-session && cd second-session
vim path/to/new-file
vim path/to/file-to-be-changed
- touch path/to/.wh.file-to-be-deleted
+ echo path/to/file1-to-be-deleted >.delete
+ echo path/to/file2-to-be-deleted >>.delete
cd ..
* Make an image contatining those files:
- mkisofs -M lfslivecd-x86-6.1-1-[version].iso \
+ mkisofs -M lfslivecd-[version].iso \
-C `cdrecord -msinfo dev=/dev/cdrom` \
-R -o second-session.iso second-session
Modified: branches/dm/packages/lfs-bootscripts/Makefile
===================================================================
--- branches/dm/packages/lfs-bootscripts/Makefile 2005-11-03 09:06:49 UTC
(rev 1038)
+++ branches/dm/packages/lfs-bootscripts/Makefile 2005-11-03 13:23:18 UTC
(rev 1039)
@@ -28,6 +28,8 @@
ln -sf ../init.d/udev /etc/rc.d/rcsysinit.d/S10udev
install -m 755 ../mountfs /etc/rc.d/init.d/
ln -sf ../init.d/mountfs /etc/rc.d/rcsysinit.d/S40mountfs
+ install -m 755 ../customize /etc/rc.d/init.d/
+ ln -sf ../init.d/customize /etc/rc.d/rcsysinit.d/S41customize
install -m 755 ../clkconf /etc/rc.d/init.d/
ln -sf ../init.d/clkconf /etc/rc.d/rcsysinit.d/S59clkconf
install -m 755 ../langconf /etc/rc.d/init.d/
Added: branches/dm/packages/lfs-bootscripts/customize
===================================================================
--- branches/dm/packages/lfs-bootscripts/customize 2005-11-03 09:06:49 UTC
(rev 1038)
+++ branches/dm/packages/lfs-bootscripts/customize 2005-11-03 13:23:18 UTC
(rev 1039)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# this script runs before "console",
+# thus translated error messages are not allowed
+
+LC_ALL=C
+export LC_ALL
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ start)
+ boot_mesg "Applying CD customizations..."
+ cd /
+ cat /dev/shm/.cdrom/.remove 2>/dev/null | xargs rm -rvf
+ cd /dev/shm/.cdrom
+ find . ! -path ./root.ext2 ! -path ./boot\* ! -path ./.remove |
\
+ cpio -pvd / 2>&1 | sed 's,^//\.,,'
+ echo_ok
+ ;;
+ *)
+ echo "Usage: ${0} {start}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/console
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page