Skip to content

Commit

Permalink
Merge pull request #15 from vmoravec/obsolete-runlevel
Browse files Browse the repository at this point in the history
Replace runlevel with services-manager dependency
  • Loading branch information
vmoravec committed Nov 11, 2013
2 parents 2e86e55 + f659c65 commit 4e033f0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.1.1
6 changes: 6 additions & 0 deletions package/autoyast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Nov 8 15:14:37 UTC 2013 - vmoravec@suse.com

- replace yast2-runlevel dependency with yast2-services-manager
FATE#312568

-------------------------------------------------------------------
Thu Oct 17 15:42:08 CEST 2013 - fehr@suse.de

Expand Down
4 changes: 2 additions & 2 deletions package/autoyast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: autoyast2
Version: 3.1.0
Version: 3.1.1
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down Expand Up @@ -73,7 +73,7 @@ Requires: yast2 >= 2.16.36
# After API cleanup
Requires: yast2-update >= 2.18.3
Requires: yast2-xml yast2-core yast2 yast2-country yast2-packager yast2-storage yast2-slp yast2-bootloader yast2-ncurses
Requires: yast2-runlevel
Requires: yast2-services-manager
Requires: yast2-transfer >= 2.21.0
Provides: yast2-trans-autoinst
Obsoletes: yast2-trans-autoinst
Expand Down
26 changes: 14 additions & 12 deletions src/clients/inst_autosetup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
#
# $Id$
module Yast
import "AutoinstConfig"

class InstAutosetupClient < Client

Target = AutoinstConfigClass::Target

def main
Yast.import "Pkg"
Yast.import "UI"
textdomain "autoinst"

Yast.import "AutoinstConfig"
Yast.import "AutoInstall"
Yast.import "Installation"
Yast.import "Profile"
Expand All @@ -27,7 +31,6 @@ def main
Yast.import "Bootloader"
Yast.import "BootCommon"
Yast.import "Popup"
Yast.import "RunlevelEd"
Yast.import "Arch"
Yast.import "AutoinstLVM"
Yast.import "AutoinstRAID"
Expand All @@ -53,7 +56,7 @@ def main
_("Create partition plans"),
_("Configure Software selections"),
_("Configure Bootloader"),
_("Configure runlevel")
_("Configure Systemd Default Target")
]

@progress_descriptions = [
Expand All @@ -63,7 +66,7 @@ def main
_("Creating partition plans..."),
_("Configuring Software selections..."),
_("Configuring Bootloader..."),
_("Configuring runlevel...")
_("Configuring Systemd Default Target...")
]

Progress.New(
Expand Down Expand Up @@ -320,18 +323,17 @@ def main
LanUdevAuto.Import(Ops.get_map(Profile.current, "networking", {}))

Progress.NextStage
@rl = Ops.get_string(Profile.current, ["runlevel", "default"], "")
Builtins.y2milestone("autoyast - configured runlevel: %1", @rl)
if @rl != ""
RunlevelEd.default_runlevel = @rl
@default_target = Profile.current['default_target'].to_s
Builtins.y2milestone("autoyast - configured default target: #{default_target}")
if !@default_target.empty?
SystemdTarget.default_target = @default_target
else
RunlevelEd.default_runlevel = Installation.x11_setup_needed &&
SystemdTarget.default_target = Installation.x11_setup_needed &&
Arch.x11_setup_needed &&
Pkg.IsSelected("xorg-x11-server") ? "5" : "3"
Pkg.IsSelected("xorg-x11-server") ? Target::GRAPHICAL : Target::MULTIUSER
end
Builtins.y2milestone(
"autoyast - setting runlevel to: %1",
RunlevelEd.default_runlevel
"autoyast - setting default target to: #{SystemdTarget.default_target}"
)

# AutoInstall::PXELocalBoot();
Expand Down
13 changes: 10 additions & 3 deletions src/modules/AutoinstConfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
require "yast"

module Yast
import "SystemdTarget"

class AutoinstConfigClass < Module

module Target
include SystemdTargetClass::BaseTargets
end

def main
Yast.import "UI"
textdomain "autoinst"
Expand Down Expand Up @@ -131,9 +138,9 @@ def main


#
# Default runlevel
# Default systemd target
#
@default_rl = "5"
@default_target = Target::GRAPHICAL


#
Expand Down Expand Up @@ -488,7 +495,7 @@ def MainHelp
publish :variable => :port, :type => "string"
publish :variable => :user, :type => "string"
publish :variable => :pass, :type => "string"
publish :variable => :default_rl, :type => "string"
publish :variable => :default_target, :type => "string"
publish :variable => :Confirm, :type => "boolean"
publish :variable => :OriginalURI, :type => "string"
publish :variable => :message, :type => "string"
Expand Down

0 comments on commit 4e033f0

Please sign in to comment.