Module: Yast::FtpServerWizardsInclude

Defined in:
../../src/include/ftp-server/wizards.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) FtpdSequence

Whole configuration of ftp-server

Returns:

  • sequence result



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File '../../src/include/ftp-server/wizards.rb', line 59

def FtpdSequence
  aliases = {
    "read"  => [lambda { ReadDialog() }, true],
    "main"  => lambda { MainSequence() },
    "write" => [lambda { WriteDialog() }, true]
  }

  sequence = {
    "ws_start" => "read",
    "read"     => { :abort => :abort, :next => "main" },
    "main"     => { :abort => :abort, :next => "write" },
    "write"    => { :abort => :abort, :next => :next }
  }

  Wizard.CreateDialog
  Wizard.SetDesktopTitleAndIcon("ftp-server")
  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  deep_copy(ret)
end

- (Object) FtpServerAutoSequence

Whole configuration of ftp-server but without reading and writing. For use with autoinstallation.

Returns:

  • sequence result



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File '../../src/include/ftp-server/wizards.rb', line 84

def FtpServerAutoSequence
  aliases = { "main" => lambda { MainSequence() } }

  sequence = {
    "ws_start" => "main",
    "main"     => { :abort => :abort, :next => :next }
  }

  Wizard.CreateDialog
  Wizard.SetDesktopTitleAndIcon("ftp-server")

  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  deep_copy(ret)
end

- (Object) initialize_ftp_server_wizards(include_target)



11
12
13
14
15
16
17
18
19
20
21
# File '../../src/include/ftp-server/wizards.rb', line 11

def initialize_ftp_server_wizards(include_target)
  Yast.import "UI"

  textdomain "ftp-server"

  Yast.import "Sequencer"
  Yast.import "Wizard"

  Yast.include include_target, "ftp-server/complex.rb"
  Yast.include include_target, "ftp-server/dialogs.rb"
end

- (Object) MainSequence

Main workflow of the ftp-server configuration

Returns:

  • sequence result



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File '../../src/include/ftp-server/wizards.rb', line 33

def MainSequence
  aliases = {
    "init"     => [lambda { RunDaemonSwitch() }, false],
    "vsftpd"   => lambda { RunFTPDialogsVsftpd() },
    "pureftpd" => lambda { RunFTPDialogsPureftpd() }
  }

  sequence = {
    "ws_start" => "init",
    "init"     => { :pureftpd => "pureftpd", :vsftpd => "vsftpd" },
    "pureftpd" => { :abort => :abort, :next => :next, :vsftpd => "vsftpd" },
    "vsftpd"   => {
      :abort    => :abort,
      :next     => :next,
      :pureftpd => "pureftpd"
    }
  }
  temp = Empty()
  Wizard.SetContents("", temp, "", false, false)
  ret = Sequencer.Run(aliases, sequence)
  deep_copy(ret)
end

- (Object) RunDaemonSwitch



23
24
25
26
27
28
29
# File '../../src/include/ftp-server/wizards.rb', line 23

def RunDaemonSwitch
  if FtpServer.vsftpd_edit
    return :vsftpd
  else
    return :pureftpd
  end
end