[Patch]Fix Image_To_Restore won't work

Installation issues, feature requests, help, etc.

Moderators: Curtis8, A_Null

Frank
Posts: 1
Joined: Tue Apr 12, 2011 1:47 am

[Patch]Fix Image_To_Restore won't work

Postby Frank » Tue Apr 12, 2011 1:54 am

I just notice Image_To_Restore syntax doesn't work, it will still ask root directory and restore directory even all required parameters passed from kernel parameter.
the forum doesn't allow me to attach a patch, just paste it here. please review and comment. thank you.



--- rc.ping.old 2011-04-11 17:44:55.039896001 -0700
+++ rc.ping 2011-04-11 17:44:35.780896003 -0700
@@ -1661,7 +1661,7 @@ if($SRC eq "local")
LOG(" Asking what parts to backup or restore\n");

if(defined($P{Image_To_Restore}) && $P{Image_To_Restore}
- && $P{Image_To_Restore} !=/^Create_New_Image$/i)
+ && $P{Image_To_Restore} !~/^Create_New_Image$/i)
{
LOG(" The user has passed a param for Image_To_Restore.\n");
LOG(" => Be clever, assume he wants a restoration !\n");
@@ -2020,11 +2020,12 @@ else
}
else
{
- if($P{Directory} && -d "$SRC/$P{Directory}")
+ if($P{Directory})
{
# from the preconfig
LOG(" Found !\n");
++ $Found;
+ $P{Directory} = "";
}
else
{

Return to “PING / General Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests