Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-07 12:29:46 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-07 12:32:01 +0300
commit7b484538db8e30b0a20315ffc448b342dd39c67f (patch)
tree62a105955d9307a732ddc7e1816222df2e4df0ac
parentc7fc8c5989cd3ae6bb2bdc93c9978fb53fd55829 (diff)
Many tiny fixes, rc5
-rw-r--r--Apps/NesGame.cs20
-rw-r--r--Apps/NesMiniApplication.cs33
-rw-r--r--Apps/SnesGame.cs10
-rw-r--r--MainForm.resx6
-rw-r--r--NesMenuCollection.cs4
-rw-r--r--Properties/AssemblyInfo.cs4
-rw-r--r--SelectModsForm.cs6
-rw-r--r--WorkerForm.cs19
-rw-r--r--hakchi_gui.csproj10
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/chmenu2
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr39
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr2
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter10
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/remote-exec16
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82remote-exec (renamed from mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82mcp-restarter)6
15 files changed, 120 insertions, 67 deletions
diff --git a/Apps/NesGame.cs b/Apps/NesGame.cs
index 6fedd280..f075e038 100644
--- a/Apps/NesGame.cs
+++ b/Apps/NesGame.cs
@@ -51,7 +51,7 @@ namespace com.clusterrr.hakchi_gui
gameGenie = File.ReadAllText(GameGeniePath);
}
- public static bool Patch(string inputFileName, ref byte[] rawRomData, ref char prefix, ref string application, ref string outputFileName, ref string args, ref Image cover, ref uint crc32)
+ public static bool Patch(string inputFileName, ref byte[] rawRomData, ref char prefix, ref string application, ref string outputFileName, ref string args, ref Image cover, ref byte saveCount, ref uint crc32)
{
// Try to patch before mapper check, maybe it will patch mapper
FindPatch(ref rawRomData, inputFileName, crc32);
@@ -69,15 +69,22 @@ namespace com.clusterrr.hakchi_gui
nesFile.CorrectRom();
crc32 = nesFile.CRC32;
if (ConfigIni.ConsoleType == MainForm.ConsoleType.NES || ConfigIni.ConsoleType == MainForm.ConsoleType.Famicom)
+ {
application = "/bin/clover-kachikachi-wr";
+ args = DefaultArgs;
+ }
else
+ {
application = "/bin/nes";
+ }
//if (nesFile.Mapper == 71) nesFile.Mapper = 2; // games by Codemasters/Camerica - this is UNROM clone. One exception - Fire Hawk
//if (nesFile.Mapper == 88) nesFile.Mapper = 4; // Compatible with MMC3... sometimes
//if (nesFile.Mapper == 95) nesFile.Mapper = 4; // Compatible with MMC3
//if (nesFile.Mapper == 206) nesFile.Mapper = 4; // Compatible with MMC3
- if (!supportedMappers.Contains(nesFile.Mapper) && (IgnoreMapper != true))
+ if (!supportedMappers.Contains(nesFile.Mapper) &&
+ (ConfigIni.ConsoleType == MainForm.ConsoleType.NES || ConfigIni.ConsoleType == MainForm.ConsoleType.Famicom)
+ && (IgnoreMapper != true))
{
if (IgnoreMapper != false)
{
@@ -93,7 +100,9 @@ namespace com.clusterrr.hakchi_gui
}
else return false;
}
- if ((nesFile.Mirroring == NesFile.MirroringType.FourScreenVram) && (IgnoreMapper != true))
+ if ((nesFile.Mirroring == NesFile.MirroringType.FourScreenVram) &&
+ (ConfigIni.ConsoleType == MainForm.ConsoleType.NES || ConfigIni.ConsoleType == MainForm.ConsoleType.Famicom) &&
+ (IgnoreMapper != true))
{
var r = WorkerForm.MessageBoxFromThread(ParentForm,
string.Format(Resources.FourScreenNotSupported, System.IO.Path.GetFileName(inputFileName)),
@@ -109,7 +118,10 @@ namespace com.clusterrr.hakchi_gui
// TODO: Make trainer check. I think that the NES Mini doesn't support it.
rawRomData = nesFile.GetRaw();
if (inputFileName.Contains("(J)")) cover = Resources.blank_jp;
- args = DefaultArgs;
+
+ if (nesFile.Battery)
+ saveCount = 3;
+
return true;
}
diff --git a/Apps/NesMiniApplication.cs b/Apps/NesMiniApplication.cs
index ed626e9f..153629f9 100644
--- a/Apps/NesMiniApplication.cs
+++ b/Apps/NesMiniApplication.cs
@@ -131,6 +131,16 @@ namespace com.clusterrr.hakchi_gui
publisher = value;
}
}
+ private byte saveCount;
+ public byte SaveCount
+ {
+ get { return saveCount; }
+ set
+ {
+ if (saveCount != value) hasUnsavedChanges = true;
+ saveCount = value;
+ }
+ }
public static NesMiniApplication FromDirectory(string path, bool ignoreEmptyConfig = false)
{
@@ -168,6 +178,7 @@ namespace com.clusterrr.hakchi_gui
string application = extension.Length > 2 ? ("/bin/" + extension.Substring(1)) : DefaultApp;
string args = null;
Image cover = DefaultCover;
+ byte saveCount = 0;
uint crc32 = CRC32(rawRomData);
string outputFileName = Regex.Replace(System.IO.Path.GetFileName(inputFileName), @"[^A-Za-z0-9()!\[\]\.\-]", "_").Trim();
@@ -183,7 +194,7 @@ namespace com.clusterrr.hakchi_gui
var patch = appinfo.Class.GetMethod("Patch");
if (patch != null)
{
- object[] values = new object[] { inputFileName, rawRomData, prefix, application, outputFileName, args, cover, crc32 };
+ object[] values = new object[] { inputFileName, rawRomData, prefix, application, outputFileName, args, cover, saveCount, crc32 };
var result = (bool)patch.Invoke(null, values);
if (!result) return null;
rawRomData = (byte[])values[1];
@@ -192,7 +203,8 @@ namespace com.clusterrr.hakchi_gui
outputFileName = (string)values[4];
args = (string)values[5];
cover = (Image)values[6];
- crc32 = (uint)values[7];
+ saveCount = (byte)values[7];
+ crc32 = (uint)values[8];
patched = true;
}
}
@@ -224,6 +236,7 @@ namespace com.clusterrr.hakchi_gui
if (!string.IsNullOrEmpty(args))
game.Command += " " + args;
game.FindCover(inputFileName, cover, crc32);
+ game.SaveCount = saveCount;
game.Save();
var app = NesMiniApplication.FromDirectory(gamePath);
@@ -255,6 +268,7 @@ namespace com.clusterrr.hakchi_gui
ReleaseDate = DefaultReleaseDate;
Publisher = DefaultPublisher;
Command = "";
+ SaveCount = 0;
}
protected NesMiniApplication(string path, bool ignoreEmptyConfig = false)
@@ -303,6 +317,9 @@ namespace com.clusterrr.hakchi_gui
case "sortrawpublisher":
Publisher = value;
break;
+ case "savecount":
+ SaveCount = byte.Parse(value);
+ break;
}
}
hasUnsavedChanges = false;
@@ -327,7 +344,7 @@ namespace com.clusterrr.hakchi_gui
$"Players={Players}\n" +
$"Simultaneous={(Simultaneous ? 1 : 0)}\n" +
$"ReleaseDate={ReleaseDate ?? DefaultReleaseDate}\n" +
- $"SaveCount=0\n" +
+ $"SaveCount={SaveCount}\n" +
$"SortRawTitle={(Name ?? Code).ToLower()}\n" +
$"SortRawPublisher={(Publisher ?? DefaultPublisher).ToUpper()}\n" +
$"Copyright=hakchi2 ©2017 Alexey 'Cluster' Avdyukhin\n");
@@ -367,19 +384,19 @@ namespace com.clusterrr.hakchi_gui
if (ConfigIni.ConsoleType == MainForm.ConsoleType.SNES || ConfigIni.ConsoleType == MainForm.ConsoleType.SuperFamicom)
{
maxX = 228;
- maxY = 228;
+ maxY = 204;
}
if ((double)image.Width / (double)image.Height > (double)maxX / (double)maxY)
- outImage = new Bitmap(maxX, (int)((double)maxY * (double)image.Height / (double)image.Width));
+ outImage = new Bitmap(maxX, (int)((double)maxX * (double)image.Height / (double)image.Width));
else
- outImage = new Bitmap((int)(maxX * (double)image.Width / (double)image.Height), maxY);
+ outImage = new Bitmap((int)(maxY * (double)image.Width / (double)image.Height), maxY);
int maxXsmall = 40;
int maxYsmall = 40;
if ((double)image.Width / (double)image.Height > (double)maxXsmall / (double)maxYsmall)
- outImageSmall = new Bitmap(maxXsmall, (int)((double)maxYsmall * (double)image.Height / (double)image.Width));
+ outImageSmall = new Bitmap(maxXsmall, (int)((double)maxXsmall * (double)image.Height / (double)image.Width));
else
- outImageSmall = new Bitmap((int)(maxXsmall * (double)image.Width / (double)image.Height), maxYsmall);
+ outImageSmall = new Bitmap((int)(maxYsmall * (double)image.Width / (double)image.Height), maxYsmall);
gr = Graphics.FromImage(outImage);
gr.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
diff --git a/Apps/SnesGame.cs b/Apps/SnesGame.cs
index f6a89fbd..cf148752 100644
--- a/Apps/SnesGame.cs
+++ b/Apps/SnesGame.cs
@@ -79,7 +79,7 @@ namespace com.clusterrr.hakchi_gui
{
}
- public static bool Patch(string inputFileName, ref byte[] rawRomData, ref char prefix, ref string application, ref string outputFileName, ref string args, ref Image cover, ref uint crc32)
+ public static bool Patch(string inputFileName, ref byte[] rawRomData, ref char prefix, ref string application, ref string outputFileName, ref string args, ref Image cover, ref byte saveCount, ref uint crc32)
{
FindPatch(ref rawRomData, inputFileName, crc32);
if (inputFileName.Contains("(E)") || inputFileName.Contains("(J)"))
@@ -97,7 +97,7 @@ namespace com.clusterrr.hakchi_gui
Array.Copy(rawRomData, 512, stripped, 0, stripped.Length);
rawRomData = stripped;
}
- MakeSfrom(ref rawRomData);
+ MakeSfrom(ref rawRomData, ref saveCount);
outputFileName = Path.GetFileNameWithoutExtension(outputFileName) + ".sfrom";
}
}
@@ -109,7 +109,7 @@ namespace com.clusterrr.hakchi_gui
return true;
}
- private static void MakeSfrom(ref byte[] rawRomData)
+ private static void MakeSfrom(ref byte[] rawRomData, ref byte saveCount)
{
var romHeaderLoRom = SnesRomHeader.Read(rawRomData, 0x7FC0);
var romHeaderHiRom = SnesRomHeader.Read(rawRomData, 0xFFC0);
@@ -167,6 +167,10 @@ namespace com.clusterrr.hakchi_gui
Array.Copy(sfromHeader1Raw, 0, result, 0, sfromHeader1Raw.Length);
Array.Copy(rawRomData, 0, result, sfromHeader1Raw.Length, rawRomData.Length);
Array.Copy(sfromHeader2Raw, 0, result, sfromHeader1Raw.Length + rawRomData.Length, sfromHeader2Raw.Length);
+
+ if (romHeader.SramSize > 0)
+ saveCount = 3;
+
rawRomData = result;
}
diff --git a/MainForm.resx b/MainForm.resx
index bf34eea1..c3bbcb89 100644
--- a/MainForm.resx
+++ b/MainForm.resx
@@ -711,7 +711,7 @@
<value>True</value>
</data>
<data name="checkBoxCompressed.Location" type="System.Drawing.Point, System.Drawing">
- <value>103, 72</value>
+ <value>103, 73</value>
</data>
<data name="checkBoxCompressed.Size" type="System.Drawing.Size, System.Drawing">
<value>72, 17</value>
@@ -762,7 +762,7 @@
<value>2</value>
</data>
<data name="maskedTextBoxReleaseDate.Location" type="System.Drawing.Point, System.Drawing">
- <value>210, 165</value>
+ <value>210, 163</value>
</data>
<data name="maskedTextBoxReleaseDate.Mask" xml:space="preserve">
<value>0000-00-00</value>
@@ -789,7 +789,7 @@
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
- <value>15, 168</value>
+ <value>15, 166</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 13</value>
diff --git a/NesMenuCollection.cs b/NesMenuCollection.cs
index 5d706811..ef659ff7 100644
--- a/NesMenuCollection.cs
+++ b/NesMenuCollection.cs
@@ -46,7 +46,9 @@ namespace com.clusterrr.hakchi_gui
break;
}
if (style == SplitStyle.NoSplit && !originalToRoot) return;
- if (((style == SplitStyle.Auto && !originalToRoot) || style == SplitStyle.FoldersEqual || style == SplitStyle.PagesEqual) &&
+ if (((style == SplitStyle.Auto && !originalToRoot) ||
+ (style == SplitStyle.FoldersEqual && !originalToRoot) ||
+ (style == SplitStyle.PagesEqual) && !originalToRoot) &&
(Count <= maxElements)) return;
var total = Count - originalCount;
var partsCount = (int)Math.Ceiling((float)total / (float)maxElements);
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index e814d44a..e0b168c8 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -33,6 +33,6 @@ using System.Resources;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.20.4")]
-[assembly: AssemblyFileVersion("2.0.20.4")]
+[assembly: AssemblyVersion("2.0.20.5")]
+[assembly: AssemblyFileVersion("2.0.20.5")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/SelectModsForm.cs b/SelectModsForm.cs
index 7b16803e..a900f18b 100644
--- a/SelectModsForm.cs
+++ b/SelectModsForm.cs
@@ -144,7 +144,7 @@ namespace com.clusterrr.hakchi_gui
private void SelectModsForm_DragDrop(object sender, DragEventArgs e)
{
- var files = (string[])e.Data.GetData(DataFormats.FileDrop);
+ var files = (string[])e.Data.GetData(DataFormats.FileDrop);
AddMods(files);
}
@@ -156,7 +156,9 @@ namespace com.clusterrr.hakchi_gui
var ext = Path.GetExtension(file).ToLower();
if (ext == ".hmod")
{
- File.Copy(file, Path.Combine(usermodsDirectory, Path.GetFileName(file)), true);
+ var target = Path.Combine(usermodsDirectory, Path.GetFileName(file));
+ if (file != target)
+ File.Copy(file, target, true);
listAddedMods.Add(Path.GetFileNameWithoutExtension(file));
}
else if (ext == ".7z" || ext == ".zip" || ext == ".rar")
diff --git a/WorkerForm.cs b/WorkerForm.cs
index 1ae07d59..81056349 100644
--- a/WorkerForm.cs
+++ b/WorkerForm.cs
@@ -487,7 +487,7 @@ namespace com.clusterrr.hakchi_gui
{
int progress = 0;
int maxProgress = 115 + (string.IsNullOrEmpty(Mod) ? 0 : 110) +
- ((hmodsInstall != null && hmodsInstall.Count() > 0) ? 184 : 0);
+ ((hmodsInstall != null && hmodsInstall.Count() > 0) ? 150 : 0);
var tempKernelPath = Path.Combine(tempDirectory, "kernel.img");
var hmods = hmodsInstall;
hmodsInstall = null;
@@ -946,13 +946,6 @@ namespace com.clusterrr.hakchi_gui
{
SetProgress(progress, maxProgress < 0 ? 1000 : maxProgress);
- int waitSeconds;
- if ((hmodsInstall != null && hmodsInstall.Count() > 0)
- || (hmodsUninstall != null && hmodsUninstall.Count() > 0))
- waitSeconds = 60;
- else
- waitSeconds = 5;
-
// Connecting to NES Mini
if (WaitForFelFromThread() != DialogResult.OK)
{
@@ -984,7 +977,7 @@ namespace com.clusterrr.hakchi_gui
}
progress += 5;
if (maxProgress < 0)
- maxProgress = (int)((double)kernel.Length / (double)67000 + waitSeconds * 2 + 12);
+ maxProgress = (int)((double)kernel.Length / (double)67000 + 50);
SetProgress(progress, maxProgress);
SetStatus(Resources.UploadingKernel);
@@ -1005,6 +998,14 @@ namespace com.clusterrr.hakchi_gui
var bootCommand = string.Format("boota {0:x}", Fel.transfer_base_m);
SetStatus(Resources.ExecutingCommand + " " + bootCommand);
fel.RunUbootCmd(bootCommand, true);
+
+ // Wait some time while booting
+ int waitSeconds;
+ if ((hmodsInstall != null && hmodsInstall.Count() > 0)
+ || (hmodsUninstall != null && hmodsUninstall.Count() > 0))
+ waitSeconds = 60;
+ else
+ waitSeconds = 5;
for (int i = 0; i < waitSeconds * 2; i++)
{
Thread.Sleep(500);
diff --git a/hakchi_gui.csproj b/hakchi_gui.csproj
index dd65be67..3669f0cb 100644
--- a/hakchi_gui.csproj
+++ b/hakchi_gui.csproj
@@ -31,8 +31,8 @@
<PublisherName>Alexey %27Cluster%27 Avdyukhin</PublisherName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>index.html</WebPage>
- <ApplicationRevision>4</ApplicationRevision>
- <ApplicationVersion>2.0.20.4</ApplicationVersion>
+ <ApplicationRevision>5</ApplicationRevision>
+ <ApplicationVersion>2.0.20.5</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
@@ -1902,12 +1902,12 @@
<Content Include="mods\mod_hakchi\hakchi\rootfs\bin\clover-canoe-shvc-wr">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="mods\mod_hakchi\hakchi\rootfs\bin\mcp-restarter">
+ <Content Include="mods\mod_hakchi\hakchi\rootfs\bin\remote-exec">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="mods\mod_hakchi\hakchi\rootfs\etc\init.d\S82mcp-restarter">
+ <None Include="mods\mod_hakchi\hakchi\rootfs\etc\init.d\S82remote-exec">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
+ </None>
<Content Include="mods\hmods\tiny7zx-dynamic.hmod">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/chmenu b/mods/mod_hakchi/hakchi/rootfs/bin/chmenu
index 5bc02713..5dff8aa1 100644
--- a/mods/mod_hakchi/hakchi/rootfs/bin/chmenu
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/chmenu
@@ -3,7 +3,7 @@ source /etc/preinit
script_init
state_file=$installpath/menu
-flag=/tmp/startmpc.flag
+flag=/var/startmpc.flag
[ -z "$1" ] && exit 1
[ -f "$state_file" ] && prev_code=$(cat "$state_file") || prev_code=000
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr b/mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr
index 97fe3e9d..eaf903db 100644
--- a/mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr
@@ -6,21 +6,30 @@
source /etc/preinit
script_init
-arg1=$1
-filename=$2
-filebase=$(basename "$filename")
-extension="${filebase##*.}"
-tmppath=/tmp/rom
-if [ "$extension" == "7z" ]; then
- mkdir -p $tmppath
- rm -rf $tmppath/*
- cd $tmppath
- tiny7zx x $filename
- filename=$(ls)
-fi
-shift
-shift
+options=""
-args="$arg1 $filename $@ $cfg_snes_extra_args"
+while [ $# -gt 0 ] ; do
+ case "$1" in
+ -rom)
+ filename=$2
+ filebase=$(basename "$filename")
+ extension="${filebase##*.}"
+ tmppath=/tmp/rom
+ if [ "$extension" == "7z" ]; then
+ mkdir -p $tmppath
+ rm -rf $tmppath/*
+ cd $tmppath
+ tiny7zx x $filename
+ filename=$tmppath/$(ls)
+ fi
+ options="-rom $filename"
+ shift
+ ;;
+ *) options="$options $1" ;;
+ esac
+ shift
+done
+
+args="$options $cfg_snes_extra_args"
exec /usr/bin/clover-canoe-shvc $args
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr b/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr
index fd24f406..a3bed783 100644
--- a/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr
@@ -16,7 +16,7 @@ if [ "$extension" == "7z" ]; then
rm -rf $tmppath/*
cd $tmppath
tiny7zx x $filename
- filename=$(ls)
+ filename=$tmppath/$(ls)
fi
if [ "$extension" == "gz" ]; then
mkdir -p $tmppath
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter b/mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter
deleted file mode 100644
index a09f331d..00000000
--- a/mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-flag=/tmp/startmpc.flag
-while [ true ]; do
- #sleep 1
- if [ -f "$flag" ]; then
- echo Restart!
- /etc/init.d/S81clover-mcp start
- rm $flag
- fi
-done
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/remote-exec b/mods/mod_hakchi/hakchi/rootfs/bin/remote-exec
new file mode 100644
index 00000000..f4368fa8
--- /dev/null
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/remote-exec
@@ -0,0 +1,16 @@
+#!/bin/sh
+mpc_flag=/var/startmpc.flag
+exec_flag=/var/exec.flag
+while [ true ]; do
+ #sleep 1
+ if [ -f "$mpc_flag" ]; then
+ echo Restart!
+ /etc/init.d/S81clover-mcp start
+ rm $mpc_flag
+ fi
+ if [ -f "$exec_flag" ]; then
+ cmd=$(cat "$exec_flag")
+ rm $exec_flag
+ $cmd
+ fi
+done
diff --git a/mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82mcp-restarter b/mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82remote-exec
index 964c84de..65395aaa 100644
--- a/mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82mcp-restarter
+++ b/mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82remote-exec
@@ -1,11 +1,11 @@
#!/bin/sh -e
start() {
- mcp-restarter &
+ remote-exec &
}
stop() {
- killall mcp-restarter
+ killall remote-exec
}
case "$1" in
@@ -20,7 +20,7 @@ restart)
start
;;
*)
- echo "mcp-restarter: Please use start, stop, or restart."
+ echo "remote-exec: Please use start, stop, or restart."
exit 1
;;
esac