PERFORCE change 122294 for review
Ivan Voras
ivoras at FreeBSD.org
Mon Jun 25 19:02:04 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=122294
Change 122294 by ivoras at ivoras_finstall on 2007/06/25 19:01:07
Replaced "regular" /tmp mounting from fstab with custom
script which mounts unionfs over parts of file system
that need to be writable.
Affected files ...
.. //depot/projects/soc2007/ivoras_finstall/makeimage/makeimage.py#5 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/util.py#3 edit
Differences ...
==== //depot/projects/soc2007/ivoras_finstall/makeimage/makeimage.py#5 (text+ko) ====
@@ -83,7 +83,7 @@
elif o == "-k":
KERNEL = a
elif o == "-p":
- PKGLISTFILE = a
+ PKGLISTFILE = os.path.realpath(a)
elif o == "-b":
DoBuild = True
elif o == "-c":
@@ -147,8 +147,8 @@
f = file("%s/etc/fstab" % DESTDIR, "w+")
f.write("# /etc/fstab generated by finstall makeimage.py on %s\n" % str_time)
f.write("/dev/iso9660/%s / cd9660 ro 0 0\n" % LABEL)
-f.write("md /tmp mfs rw,-S,-s32m 0 0\n")
-f.write("/tmp /etc unionfs rw,copymode=transparent 0 0\n")
+#f.write("md /tmp mfs rw,-S,-s32m 0 0\n")
+#f.write("/tmp /etc unionfs rw,copymode=transparent 0 0\n")
f.close()
# Edit rc.conf
@@ -185,12 +185,26 @@
f.write("#!/bin/sh\ncd /tmp\npkg_delete -av\n")
for pkg in master_pkglist:
f.write("/usr/sbin/pkg_add -v %s\n" % dest_pkgs[pkg])
+ printmsg("LiveCD will contain package: %s" % pkg)
f.close()
execute("chroot %s /bin/sh /tmp/pkginst.sh" % DESTDIR)
for pkg in dest_pkgs:
os.unlink(dest_pkgs[pkg])
os.unlink("pkginst.sh")
+f = file("%s/etc/rc.d/livecd" % DESTDIR, "w")
+f.write("# /etc/rc.d/livecd generated by finstall makeimage.py on %s\n" % str_time)
+f.write("# BEFORE: hostid\n")
+f.write("# REQUIRE: root\n")
+f.write("# KEYWORD: nojail\n\n")
+f.write("/sbin/mount_mfs -s 32m -S md /tmp\n")
+f.write("/bin/mkdir /tmp/etc /tmp/log /tmp/run /tmp/tmp\n")
+f.write("/sbin/mount_unionfs -o copymode=transparent /tmp/etc /etc\n")
+f.write("/sbin/mount_unionfs -o copymode=transparent /tmp/log /var/log\n")
+f.write("/sbin/mount_unionfs -o copymode=transparent /tmp/run /var/run\n")
+f.write("/sbin/mount_unionfs -o copymode=transparent /tmp/tmp /var/tmp\n")
+f.close()
+execute("chmod a+x %s/etc/rc.d/livecd" % DESTDIR)
os.chdir(WORKDIR)
if ISO == None:
==== //depot/projects/soc2007/ivoras_finstall/makeimage/util.py#3 (text+ko) ====
@@ -37,7 +37,7 @@
basewin.idlok(True)
basewin.idcok(True)
basewin.erase()
- basewin.addstr(5, 0, '-'*mx)
+ basewin.hline(5, 0, curses.ACS_HLINE, mx)
basewin.refresh()
msgwin = curses.newwin(5,mx,0,0)
cmdwin = curses.newwin(my-6,mx,6,0)
More information about the p4-projects
mailing list