On Thursday 07 May 2015 14:00:55 Olaf Hering wrote:
> What is the easiest way to decide if a given directory tree from a block
> device is an install media?
>
> In grub2 for Xen PV guests a grub script has to decide if a menu has to
> be presented or not. The current approach is to do something like
>         r=some_disk
>         if test -e $r/content &&
>            test -e $r/boot/x86_64/vmlinuz-xen &&
>            test -e $r/boot/x86_64/initrd-xen
>         then
>            show install menu
>            show boot menu
>         else
>            show boot menu
>         fi
>
> I wonder if that is robust enough to decide if a given block device is
> an installation DVD or not. Should the script stat something else, or
> some additional files to be sure, like /media.1/directory.yast or
> /media.1/media?

In theory it starts with (optional) /media.1/products.

/media.1/products contains the list of directories on the media that
contain repos:
  / SUSE-Linux-Enterprise-.....

The /content file is the master index of the repository in /. 

In theory we can have content in a subdir, if /media.1/products says so. 
Without /media.1/products the repo must be in /.

So I'd test for '/media.1/products or /content' being present.

-- 

cu,
    Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862  27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres       SUSE LINUX GmbH, Development,        m...@suse.de
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 74 053-0
+------------------------------------------------------------------+
SUSE Linux GmbH GF: Felix Imendörffer, Jane Smithard, Jennifer Guild
       Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: zypp-devel+ow...@opensuse.org

Reply via email to