imgcreate/kickstart.py | 18 +++++++++++------- tools/livecd-iso-to-disk.sh | 21 +++++++++++++++++---- 2 files changed, 28 insertions(+), 11 deletions(-)
New commits: commit d9880bf3823b21421f4916d64648a990a7392ecb Author: Jeremy Katz <[email protected]> Date: Tue Mar 31 14:12:00 2009 -0400 Support the rest of the firewall args for kickstart configs Support trusteddevs, services and ports in the firewall line diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py index 253d349..5afe8f9 100644 --- a/imgcreate/kickstart.py +++ b/imgcreate/kickstart.py @@ -172,18 +172,22 @@ class AuthConfig(KickstartConfig): class FirewallConfig(KickstartConfig): """A class to apply a kickstart firewall configuration to a system.""" def apply(self, ksfirewall): - # - # FIXME: should handle the rest of the options - # if not os.path.exists(self.path("/usr/sbin/lokkit")): return + args = ["/usr/sbin/lokkit", "-f", "--quiet", "--nostart"] if ksfirewall.enabled: - status = "--enabled" + args.append("--enabled") + + for port in ksfirewall.ports: + args.append("--port=%s" %(port,)) + for svc in ksfirewall.services: + args.append("--service=%s" %(svc,)) + for dev in ksfirewall.trusts: + args.append("--trust=%s" %(dev,)) else: - status = "--disabled" + args.append("--disabled") - self.call(["/usr/sbin/lokkit", - "-f", "--quiet", "--nostart", status]) + self.call(args) class RootPasswordConfig(KickstartConfig): """A class to apply a kickstart root password configuration to a system.""" commit b9e8cc6bf67ed6e4202453ffb6ae6a7149a100ab Author: Alexander Boström <[email protected]> Date: Fri Mar 27 22:00:20 2009 +0100 Handle the case when the kernel can't mount squashfs.img (probably a mksquashfs/running kernel mismatch). diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 96869c7..daadc3d 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -191,6 +191,11 @@ checkGPT() { partinfo=$(/sbin/parted --script -m $device "print" |grep ^$partnum:) volname=$(echo $partinfo |cut -d : -f 6) flags=$(echo $partinfo |cut -d : -f 7) + if [ "$volname" != "EFI System Partition" ]; then + echo "Partition name must be 'EFI System Partition'" + echo "This can be set in parted or you can run with --reset-mbr" + exitclean + fi if [ "$(echo $flags |grep -c boot)" = "0" ]; then echo "Partition isn't marked bootable!" echo "You can mark the partition as bootable with " @@ -457,9 +462,17 @@ else fi livesize=$(du -s -B 1M $check | awk {'print $1;'}) if [ -n "$skipcompress" ]; then - mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT - livesize=$(du -s -B 1M $CDMNT/LiveOS/ext3fs.img | awk {'print $1;'}) - umount $CDMNT + if [ -e $CDMNT/LiveOS/squashfs.img ]; then + if mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT; then + livesize=$(du -s -B 1M $CDMNT/LiveOS/ext3fs.img | awk {'print $1;'}) + umount $CDMNT + else + echo "WARNING: --skipcompress or --xo was specified but the currently" + echo "running kernel can not mount the squashfs from the ISO file to extract" + echo "it. The compressed squashfs will be copied to the USB stick." + skipcompress="" + fi + fi fi free=$(df -B1M $USBDEV |tail -n 1 |awk {'print $4;'}) @@ -500,7 +513,7 @@ if [ -z "$skipcopy" ];then [ ! -d $USBMNT/$LIVEOS ] && mkdir $USBMNT/$LIVEOS [ -n "$keephome" -a -f "$USBMNT/$HOMEFILE" ] && mv $USBMNT/$HOMEFILE $USBMNT/$LIVEOS/$HOMEFILE if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then - mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT + mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT || exitclean cp $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || (umount $CDMNT ; exitclean) umount $CDMNT elif [ -f $CDMNT/LiveOS/squashfs.img ]; then -- Fedora-livecd-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-livecd-list
