Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=f188a0fcd59ad3982cb49b92b21cc7bdb35bcbb7

commit f188a0fcd59ad3982cb49b92b21cc7bdb35bcbb7
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Sat Nov 5 02:16:56 2011 +0100

make remaining hardwired strings configurable

diff --git a/TODO b/TODO
index e36feb5..4ca1b18 100644
--- a/TODO
+++ b/TODO
@@ -1,16 +1,2 @@
-This is a prototype of a vanilla-kernel-based livecd rework. The idea is that
-instead of aufs (which has design problems, and probably won't be integrated to
-the vanilla kernel ever), we can use dmsetup to do the "cd is read-only, but
-make it writeble in the memory" trick.
-
-In fact dracut has full support for this, so a few lines of shell-script can do
-all the Frugalware-specific part.
-
-WARNING: Any file or directory in this subdirectory may be overwritten or 
deleted
-during creating the livecd, except the .sh files!
-
-To try it yourself, run each script after each other, the last one will boot up
-the result in qemu.
-
-TODO:
-- avoid pointless hardwired strings
+- drop rd.driver.pre=loop after next kernel pkg
+- detect version in boot menu after next frugalware pkg
diff --git a/bin/boot-qemu b/bin/boot-qemu
index 877b261..9a9eaa5 100755
--- a/bin/boot-qemu
+++ b/bin/boot-qemu
@@ -1,3 +1,11 @@
+#!/bin/bash -xe
+
source ./config

-qemu-system-x86_64 -enable-kvm -m 512 -cdrom fwlive-$TREE.iso
+QEMU="qemu"
+
+if [ "$ARCH" = "x86_64" ]; then
+       QEMU="qemu-system-x86_64"
+fi
+
+$QEMU -enable-kvm -m $QEMUMEM -cdrom fwlive-$TREE.iso
diff --git a/bin/create-rootfs b/bin/create-rootfs
index aea4ad8..2dbf6ea 100755
--- a/bin/create-rootfs
+++ b/bin/create-rootfs
@@ -77,7 +77,10 @@ echo "Server = $MIRROR/frugalware-$TREE/frugalware-$ARCH" >> 
pacman-g2.conf
pacman -Sy $TARGETS -r "$CHROOTDIR" --noconfirm --config pacman-g2.conf

# Post-install tweaks
-chroot $CHROOTDIR sh -c 'echo "root:fwlive" | chpasswd'
+chroot $CHROOTDIR sh -c "echo 'root:$ROOTPASS' | chpasswd"
+if [ -n "$USERNAME" -a -n "$USERPASS" ]; then
+       yes ''|chroot $CHROOTDIR /usr/sbin/adduser "$USERNAME" "Fwlive User" 
"$USERPASS" "/home/$USERNAME"
+fi
# silence warning about missing /etc/sysconfig/desktop
ln -sf /lib/systemd/system/multi-user.target 
$CHROOTDIR/etc/systemd/system/default.target
## file /etc/hostname
diff --git a/bin/create-squash b/bin/create-squash
index b9c0a40..b57138c 100755
--- a/bin/create-squash
+++ b/bin/create-squash
@@ -9,6 +9,5 @@ fi

mkdir -p $TREE/squashfs-root/LiveOS
mv $TREE/rootfs.img $TREE/squashfs-root/LiveOS
-# TODO can be xz
rm -f $TREE/squashfs.img
mksquashfs $TREE/squashfs-root $TREE/squashfs.img -comp $COMPRESS
diff --git a/config.dev b/config.dev
index e75acc9..32ce465 100644
--- a/config.dev
+++ b/config.dev
@@ -30,3 +30,15 @@ FWLHOST="fwlive"
# - lzo needs a 2.6.36+ kernel
# - lzma needs custom kernel
COMPRESS="gzip"
+
+# Amount of memory qemu should get on 'make boot' (in MB)
+QEMUMEM="1024"
+
+# Password of the root user
+ROOTPASS="fwlive"
+
+# Normal user name
+USERNAME="fwlive"
+
+# Normal user password
+USERPASS="fwlive"
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to