[Frugalware-darcs] setup-current: new plugin: restart

VMiklos vmiklos at frugalware.org
Thu Mar 16 18:06:37 CET 2006


[new plugin: restart
VMiklos <vmiklos at frugalware.org>**20051105140635] {
hunk ./src/plugins/Makefile 11
-PLUGINS=asklang dolangsh greet layout hotplug loadsource
+PLUGINS=asklang dolangsh greet layout hotplug loadsource restart
hunk ./src/plugins/Makefile 38
+
+restart: restart.o ../util.o
+	$(CC) $(CFLAGS) -shared -Wl,-soname,restart.so -o 95restart.so \
+		restart.o ../util.o $(LDFLAGS)
addfile ./src/plugins/restart.c
hunk ./src/plugins/restart.c 1
+#include <stdio.h>
+#include <dialog.h>
+
+#include <setup.h>
+#include <util.h>
+#include "common.h"
+
+plugin_t plugin =
+{
+	"restart",
+	run,
+	NULL // dlopen handle
+};
+
+plugin_t *info()
+{
+	return &plugin;
+}
+
+int run(GList **config)
+{
+	char *version = get_version();
+
+	system(g_strdup_printf("%s/usr/bin/eject %s >%s 2>%s", TARGETDIR,
+		(char*)data_get(*config, "srcdev"), LOGDEV, LOGDEV));
+
+	dlg_put_backtitle();
+	dialog_msgbox(_("Setup complete"), g_strdup_printf(_("System "
+		"installation and configuration is successfully completed. We "
+		"hope that %s will take you content. Please remove "
+		"the media from your drive and press ENTER to reboot."),
+		version), 0, 0, 1);
+	exit_perform();
+	FREE(version);
+	return(0);
+}
hunk ./src/setup.h 11
+#define TARGETDIR "/mnt/target"
}


More information about the Frugalware-darcs mailing list