Skip to content
Permalink
Browse files

Initial clone finish client and fix syntax in proposal

  • Loading branch information...
jreidinger committed Jan 6, 2014
1 parent 20d5773 commit 09a6a8f01c2960c5e4dd7f5a9df53b663dff2fe4
Showing with 70 additions and 1 deletion.
  1. +68 −0 src/clients/clone_finish.rb
  2. +1 −1 src/clients/clone_proposal.rb
  3. +1 −0 src/clients/inst_finish.rb
@@ -0,0 +1,68 @@
# encoding: utf-8

# ------------------------------------------------------------------------------
# Copyright (c) 2014 Novell, Inc. All Rights Reserved.
#
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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, contact Novell, Inc.
#
# To contact Novell about this file by physical or electronic mail, you may find
# current contact information at www.novell.com.
# ------------------------------------------------------------------------------


module Yast
class CloneFinishClient < Client
def main

textdomain "installation"

func = ""

# Check arguments
args = WFM.Args
if args.size > 0 && args[0].is_a?(::String)
func = args[0]
end

Builtins.y2milestone("starting clonse_finish")
Builtins.y2debug("func=%1", func)

case func
when "Info"
return {
"steps" => 1,
# progress step title
"title" => _(
"Generating autoyast profile if needed..."
),
"when" => [:installation]
}
when "Write"
WFM.call("clone_proposal", ["Write"])

# copy from insts_sys to target system
if File.exists? "/root/autoinst.xml"
WFM.Execute(path(".local.bash"), "cp /root/autoinst.xml /mnt/root/autoinst.xml")
end

Builtins.y2milestone("Clone finish write finish")
else
raise ("unknown function: #{func}")
end

return nil
end
end
end

Yast::CloneFinishClient.new.main
@@ -80,7 +80,7 @@ def main
"id" => "clone"
}
when "Write"
WFM.Call "clone_system" if CloneProposalHolder.value
WFM.call "clone_system" if CloneProposalHolder.value
ret = true
else
raise "Unsuported action #{func}"
@@ -129,6 +129,7 @@ def main
"autoinst_scripts1",
"copy_files",
"copy_systemfiles",
"clone",
# For live installer only
Mode.live_installation ? "live_copy_files" : "",
"switch_scr"

0 comments on commit 09a6a8f

Please sign in to comment.
You can’t perform that action at this time.