Subject: mklivecd experience
To: None <>
From: Mike M. Volokhov <>
List: tech-pkg
Date: 03/30/2005 16:12:44

Today I've tried pkgsrc/sysutils/mklivecd package. Well, the idea is
pretty cool (thanks, xtraeme!). But after running "mklivecd chroot" I
found that my kernel is NetBSD-current when unpacked sets was from 2.0.
Thus, I just pressed CTRL+D and ran "mklivecd clean". This was removed
just all contents of my pkgsrc build farm, so as this stuff still
mounted at livecd/work directory. :-O

Unfortunately, I'm unable to reproduce this (possible I have cd'ed to
pkgsrc/distfiles inside work directory from another shell to investigate
its structure).

Thus, the patch below should prevent such accidents in future (it also
fix the path to GRUB files). Unfortunatelly, I don't look on mklivecd
deeper so as I must restore my pkgsrc builds first.

RCS file: /cvsroot/pkgsrc/sysutils/mklivecd/files/,v
retrieving revision 1.19
diff -u -r1.19
---	16 Mar 2005 16:37:38 -0000	1.19
+++	30 Mar 2005 13:10:31 -0000
@@ -257,7 +257,7 @@
 		    for f in $GRUB_FILES
 			    if [ ! -f $ISODIR/$BOOTDIR/$f ]; then
-				cp @PREFIX@/share/grub/@MACHINE_ARCH@-/$f \
+				cp @PREFIX@/lib/grub/@MACHINE_ARCH@-/$f \
 				[ "$verbose_mode" = "on" ] && \
 				    showmsg "Copying $f into $ISODIR/$BOOTDIR."
@@ -589,6 +589,10 @@
+		if [ -f $pkgsrc_mntstat -o -f $pkgsrcdist_mntstat ]; then
+			showmsg "The pkgsrc directories still in use! Exiting."
+			bye 1
+		fi
 		showmsg "Cleaning WORKDIR: $WORKDIR"
 		rm -rf $WORKDIR
 		for F in bin dev etc lib libexec mnt rescue \