ACC SHELL

Path : /usr/share/YaST2/clients/
File Upload :
Current File : //usr/share/YaST2/clients/disk.ycp

/**
 * File:
 *   disk.ycp
 *
 * Module:
 *   Configuration of disk
 *
 * Summary:
 *   Main file
 *
 * Authors:
 *   Michael Hager <mike@suse.de>
 *
 * $Id: disk.ycp 50533 2008-09-01 15:09:58Z aschnell $
 *
 * Wrapper file for inst_disk.ycp
 *
 */
{
    textdomain "storage";

    import "Popup";
    import "Wizard";
    import "Misc";
    import "Label";


    // popup text
    string msg = _("Only use this program if you are familiar with partitioning hard disks.

Never partition disks that may, in any way, be in use
(mounted, swap, etc.) unless you know exactly what you are
doing. Otherwise, the partitioning table will not be forwarded to the
kernel, which would most likely lead to data loss.

To continue despite this warning, click Yes.
");


    // no params == UI, some params == commandline
    if (size (WFM::Args()) == 0)
    {
	Wizard::CreateDialog();
	Wizard::SetContents(
	    // dialog heading
	    _("Expert Partitioner"),
	    // text show during initialization
	    `Label(_("Initializing...")),
	    // helptext
	    _("<p>Please wait, while volumes are being detected.</p>"),
	    false,
	    false
	);
	Wizard::SetTitleIcon ("yast-disk");

	// popup headline
	integer warn = tointeger(Misc::SysconfigRead( .sysconfig.storage.WARN_EXPERT, "1" ));
	y2milestone( "warn:%1", warn );
	if( warn==nil )
	    warn = 1;
	if (warn==0||Popup::YesNoHeadline(Label::WarningMsg(),msg)==true) {
	    y2milestone ("--- Calling disk_worker %1 ---", WFM::Args());
	    any ret = WFM::call("disk_worker", WFM::Args());
	    y2milestone ("--- Returned: %1 ---", ret);
	} else {
	    y2milestone ("User decided not to run disk...");
	}

	Wizard::CloseDialog();
    }
    else
    {
	y2milestone ("--- Calling disk_worker %1 ---", WFM::Args());
	any ret = WFM::call("disk_worker", WFM::Args());
	y2milestone ("--- Returned: %1 ---", ret);
    }

    return true;
}

ACC SHELL 2018