[PATCH 4/6] livemedia-creator: Check fsimage kickstart for single partition

Martin Kolman mkolman at redhat.com
Mon Apr 7 12:53:56 UTC 2014


On Fri, 2014-04-04 at 15:04 -0700, Brian C. Lane wrote:
> ---
>  src/sbin/livemedia-creator | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator
> index eb9ca51..c02727e 100755
> --- a/src/sbin/livemedia-creator
> +++ b/src/sbin/livemedia-creator
> @@ -956,8 +956,13 @@ if __name__ == '__main__':
>              errors.append("The kickstart must not set a display mode (text, cmdline, "
>                            "graphical), this will interfere with livemedia-creator.")
>  
> -        # TODO add a check for fsimage partition, no autopart and only / or swap part
> -
> +        if opts.make_fsimage:
> +            # Make sure the kickstart isn't using autopart and only has a / mountpoint
> +            part_ok = not any(p for p in ks.handler.partition.partitions
> +                                 if p.mountpoint not in ["/", "swap"])
> +            if not part_ok or ks.handler.autopart.seen:
> +                errors.append("Filesystem images must use a singe / part, not autopart or "
                                                              ^^^^^
                                                              single ?
> +                              "multiple partitions. swap is allowed but not used.")
>  
>          if errors:
>              map(log.error, errors)




More information about the anaconda-patches mailing list