diff --git a/neon/data/calamares_partitioning_only.rb b/neon/data/calamares_partitioning_only.rb index 537b4c4..7c3cb0c 100644 --- a/neon/data/calamares_partitioning_only.rb +++ b/neon/data/calamares_partitioning_only.rb @@ -1,52 +1,52 @@ #!/usr/bin/env ruby # # Copyright (C) 2018 Harald Sitter # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License or (at your option) version 3 or any later version # accepted by the membership of KDE e.V. (or its successor approved # by the membership of KDE e.V.), which shall act as a proxy # defined in Section 14 of version 3 of the license. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Disable all modules except for partitioning. require 'yaml' puts "#{$0}: Disabling all clamares modules except for partitioning" file = '/calamares/desktop/settings.conf' settings = YAML.load_file(file) exec_rule = settings['sequence'].find { |x| x.key?('exec') } exec_rule['exec'] = %w[partition] File.write(file, YAML.dump(settings)) require 'fileutils' FileUtils.cp('/sbin/sfdisk', '/sbin/sfdisk.orig', verbose: true) File.write('/sbin/sfdisk', <<-EOF) #!/bin/sh -set -ex +set -e echo "" >> /tmp/sfdisk-stdout.log echo "" >> /tmp/sfdisk-stdout.log echo "" >> /tmp/sfdisk-stdout.log echo "sfdisk $@" >> /tmp/sfdisk-stdout.log echo "" >> /tmp/sfdisk-stderr.log echo "" >> /tmp/sfdisk-stderr.log echo "" >> /tmp/sfdisk-stderr.log echo "sfdisk $@" >> /tmp/sfdisk-stderr.log /sbin/sfdisk.orig "$@" > >(tee -a /tmp/sfdisk-stdout.log) 2> >(tee -a sfdisk-stderr.log >&2) EOF File.chmod(0o755, '/sbin/sfdisk')