ACC SHELL

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

/**
 * File:    pre_umount_finish.ycp
 *
 * Module:  Step of base installation finish (bugzilla #205389)
 *
 * Authors: Lukas Ocilka <lukas.ocilka@suse.cz>
 *
 * $Id: pre_umount_finish.ycp 57028 2009-04-29 10:58:09Z lslezak $
 *
 */

{

import "Misc";
import "Installation";
import "String";

include "installation/inst_inc_first.ycp";

textdomain "installation";

any ret = nil;
string func = "";
map param = $[];

/* Check arguments */
if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
    func = (string)WFM::Args(0);
    if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
	param = (map)WFM::Args(1);
}

y2milestone ("starting pre_umount_finish");
y2debug("func=%1", func);
y2debug("param=%1", param);

if (func == "Info")
{
    return (any)$[
	"steps" : 1,
	// progress step title
	"title" : _("Checking the installed system..."),
	// !Mode::autoinst
	"when" : [ `installation, `live_installation, `update, `autoinst ],
    ];
}
else if (func == "Write")
{
    // bugzilla #326478
    // some processes might be still running...
    string cmd = sformat ("fuser -v '%1' 2>&1", String::Quote (Installation::destdir));
    map cmd_run = (map) WFM::Execute (.local.bash_output, cmd);

    y2milestone ("These processes are still running at %1 -> %2", Installation::destdir, cmd_run);

    if (size (Misc::boot_msg) > 0) {
	// just a beep
	SCR::Execute (.target.bash, "/bin/echo -e '\a'");
    }

    // creates or removes the runme_at_boot file (for second stage)
    // according to the current needs
    //
    // Must be called before 'umount'!
    //
    // See FATE #303396
    HandleSecondStageRequired();
}
else
{
    y2error ("unknown function: %1", func);
    ret = nil;
}

y2debug("ret=%1", ret);
y2milestone("pre_umount_finish finished");
return ret;


} /* EOF */

ACC SHELL 2018