Class: Y2Network::Startmodes::Ifplugd

Inherits:
Y2Network::Startmode show all
Includes:
Yast::I18n
Defined in:
src/lib/y2network/startmodes/ifplugd.rb

Overview

ifplugd startmode with additional attribute for priority.

Boot of interface is managed by ifplugd daemon and not wicked. So it cannot be found in ifcfg man page. Ifplugd is a daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with on-board network adapters, since it will only configure the interface when a cable is really connected.

Constant Summary

Constants inherited from Y2Network::Startmode

Y2Network::Startmode::ALIASES

Instance Attribute Summary collapse

Attributes inherited from Y2Network::Startmode

#alias_name, #name

Instance Method Summary collapse

Methods inherited from Y2Network::Startmode

all, create

Constructor Details

#initializeIfplugd

Returns a new instance of Ifplugd.



36
37
38
39
40
41
42
# File 'src/lib/y2network/startmodes/ifplugd.rb', line 36

def initialize
  textdomain "network"

  @priority = 0

  super("ifplugd")
end

Instance Attribute Details

#priorityObject

Returns the value of attribute priority.



34
35
36
# File 'src/lib/y2network/startmodes/ifplugd.rb', line 34

def priority
  @priority
end

Instance Method Details

#==(other) ⇒ Object



48
49
50
# File 'src/lib/y2network/startmodes/ifplugd.rb', line 48

def ==(other)
  name == other.name && priority == other.priority
end

#long_descriptionObject



52
53
54
55
56
# File 'src/lib/y2network/startmodes/ifplugd.rb', line 52

def long_description
  _(
    "Started automatically on cable connection"
  )
end

#to_human_stringObject



44
45
46
# File 'src/lib/y2network/startmodes/ifplugd.rb', line 44

def to_human_string
  _("On Cable Connection")
end