Created
June 8, 2022 12:21
-
-
Save imobachgs/55e7532bfa6ca553c6c2618722d104d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE profile> | |
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> | |
<% home_in_sdb = disks.map { |d| d[:device] }.include?("sdb") %> | |
<partitioning config:type="list"> | |
<drive> | |
<device>/dev/sda</device> | |
<disklabel>gpt</disklabel> | |
<enable_snapshots t="boolean">true</enable_snapshots> | |
<partitions t="list"> | |
<% if boot_efi? %> | |
<partition t="map"> | |
<create t="boolean">true</create> | |
<filesystem t="symbol">vfat</filesystem> | |
<format t="boolean">true</format> | |
<mount>/boot/efi</mount> | |
<partition_id t="integer">259</partition_id> | |
<size>500MiB</size> | |
</partition> | |
<% end %> | |
<partition> | |
<create t="boolean">true</create> | |
<format t="boolean">true</format> | |
<filesystem t="symbol">btrfs</filesystem> | |
<mount>/</mount> | |
<size>max</size> | |
</partition> | |
<% if !home_in_sdb %> | |
<partition> | |
<create t="boolean">true</create> | |
<format t="boolean">true</format> | |
<filesystem t="symbol">xfs</filesystem> | |
<mount>/home</mount> | |
<size>max</size> | |
</partition> | |
<% end %> | |
</partitions> | |
</drive> | |
<!-- Please, do not do this, as AutoYaST internals might change --> | |
<% if home_in_sdb %> | |
<% url_tokens = Yast::AutoinstConfig.urltok %> | |
<% path = url_tokens["path"] %> <!-- in the example above, it could be "/profiles/autoinst.xml") --> | |
<% new_path = File.join(File.dirname(path), "separate-home.xml") %> | |
<% new_url = Yast::URL.Build(url_tokens.merge("path" => new_path)) %> | |
<% require "open-uri" %> | |
<%= URI.open(new_url).read %> | |
<% end %> | |
</partitioning> | |
</profile> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment