Skip to content

Commit

Permalink
Changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Dec 3, 2014
1 parent 67fb606 commit 84c9ff2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 35 deletions.
21 changes: 0 additions & 21 deletions src/lib/bootloader/auto_client.rb
@@ -1,31 +1,10 @@
# encoding: utf-8

# File:
# bootloader_auto.ycp
#
# Module:
# Bootloader installation and configuration
#
# Summary:
# Bootloader autoinstallation preparation
#
# Authors:
# Jiri Srain <jsrain@suse.cz>
#
# $Id$
#

require "installation/auto_client"

module Bootloader
# Autoyast client for bootloader
class AutoClient < ::Installation::AutoClient
include Yast::I18n
include Yast::Logger

def initialize
Yast.import "UI"
textdomain "bootloader"

Yast.import "Bootloader"
Yast.import "BootCommon"
Expand Down
27 changes: 14 additions & 13 deletions src/lib/bootloader/finish_client.rb
Expand Up @@ -5,7 +5,6 @@ module Bootloader
# Finish client for bootloader configuration
class FinishClient < ::Installation::FinishClient
include Yast::I18n
include Yast::Logger

BASH_PATH = Yast::Path.new(".target.bash_output")

Expand Down Expand Up @@ -119,18 +118,20 @@ def write
def update_mount
return unless Yast::Mode.update

cmd = "targetdir=#{Installation.destdir}\n" \
"if test ${targetdir} = / ; then echo targetdir is / ; exit 1 ; fi\n" \
"grep -E \"^[^ ]+ ${targetdir}/dev \" < /proc/mounts\n" \
"if test $? = 0\n" \
"then\n" \
"\techo targetdir ${targetdir} already mounted.\n" \
"\texit 1\n" \
"else\n" \
"\tmkdir -vp ${targetdir}/dev\n" \
"\tcp --preserve=all --recursive --remove-destination /lib/udev/devices/* ${targetdir}/dev\n" \
"\tmount -v --bind /dev ${targetdir}/dev\n" \
"fi\n"
cmd = <<-eos
targetdir=#{Installation.destdir}
if test ${targetdir} = / ; then echo targetdir is / ; exit 1 ; fi
grep -E \"^[^ ]+ ${targetdir}/dev \" < /proc/mounts
if test $? = 0
then
echo targetdir ${targetdir} already mounted.
exit 1
else
mkdir -vp ${targetdir}/dev
cp --preserve=all --recursive --remove-destination /lib/udev/devices/* ${targetdir}/dev
mount -v --bind /dev ${targetdir}/dev
fi
eos
out = WFM.Execute(Yast::Path.new(".local.bash_output"), cmd)
log.error "unable to bind mount /dev in chroot" if out["exit"] != 0
log.info "#{cmd}\n output: #{out}"
Expand Down
1 change: 0 additions & 1 deletion src/lib/bootloader/proposal_client.rb
Expand Up @@ -4,7 +4,6 @@ module Bootloader
# Proposal client for bootloader configuration
class ProposalClient < ::Installation::ProposalClient
include Yast::I18n
include Yast::Logger

def initialize
Yast.import "UI"
Expand Down

0 comments on commit 84c9ff2

Please sign in to comment.