Revision: 5702
Author: pebender
Date: Sat Oct 17 20:12:08 2009
Log: - Fixed bug that caused boot to fail when huludesktop.data is not  
present
   in the MiniMyth read-write configuration directory.


http://code.google.com/p/minimyth/source/detail?r=5702

Modified:
  /trunk/gar-minimyth/html/minimyth/document-changelog.txt
   
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HULU.pm
   
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
   
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/hulu.pm

=======================================
--- /trunk/gar-minimyth/html/minimyth/document-changelog.txt    Sat Oct 17  
09:45:57 2009
+++ /trunk/gar-minimyth/html/minimyth/document-changelog.txt    Sat Oct 17  
20:12:08 2009
@@ -16,3 +16,7 @@
                                                   VDPAU (patch  
glvdpau20744).
      MythTV 0.22:         version 0.22.0,         release-0-22-fixes branch  
svn 22512.
      MythTV trunk:        version trunk.22510     trunk svn 22510.
+
+Fixed bugs
+    - Fixed bug that caused boot to fail when huludesktop.data is not  
present
+      in the MiniMyth read-write configuration directory.
=======================================
---  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HULU.pm
       
Wed Oct 14 13:35:45 2009
+++  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HULU.pm
       
Sat Oct 17 20:12:08 2009
@@ -71,11 +71,7 @@

          return $value_default;
      },
-    value_valid    => 'no|yes',
-    value_file     => 'yes',
-    file           => {name_remote => '/huludesktop.data',
-                       mode_remote => 'rw',
-                       name_local   
=> '/home/minimyth/.local/share/.huludesktop.data'}
+    value_valid    => 'no|yes'
  };

  1;
=======================================
---  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
       
Wed Oct 14 13:35:45 2009
+++  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
       
Sat Oct 17 20:12:08 2009
@@ -626,7 +626,6 @@
              foreach (@{$file})
              {
                  my $name_remote = $_->{'name_remote'};
-                my $mode_remote = $_->{'mode_remote'} || 'ro';
                  my $name_local  = $_->{'name_local'};
                  my $mode_local  = $_->{'mode_local'}  || '0644' ;

@@ -634,37 +633,18 @@
                  {
                      File::Path::rmtree($name_local);
                  }
-                if ($mode_remote eq 'ro')
-                {
-                    my $result = $minimyth->confro_get($name_remote,  
$name_local);
-                    if (! -e $name_local)
-                    {
-                        $minimyth->message_output('err', qq(failed to  
fetch MiniMyth read-only configuration file ') . $name_remote . qq('));
-                        $success = 0;
-                    }
-                    else
-                    {
-                        $minimyth->message_log('info', qq(fetched MiniMyth  
read-only configuration file ') . $name_remote . qq('));
-                        $minimyth->message_log('info', qq(  by  
fetching ') . $result . qq('));
-                        $minimyth->message_log('info', qq(  to local  
file ') . $name_local . qq('.));
-                        chmod(oct($mode_local), $name_local);
-                    }
-                }
-                if ($mode_remote eq 'rw')
-                {
-                    my $result = $minimyth->confrw_get($name_remote,  
$name_local);
-                    if (! -e $name_local)
-                    {
-                        $minimyth->message_output('err', qq(failed to  
fetch MiniMyth read-write configuration file ') . $name_remote . qq('));
-                        $success = 0;
-                    }
-                    else
-                    {
-                        $minimyth->message_log('info', qq(fetched MiniMyth  
read-write configuration file ') . $name_remote . qq('));
-                        $minimyth->message_log('info', qq(  by  
fetching ') . $result . qq('));
-                        $minimyth->message_log('info', qq(  to local  
file ') . $name_local . qq('.));
-                        chmod(oct($mode_local), $name_local);
-                    }
+                my $result = $minimyth->confro_get($name_remote,  
$name_local);
+                if (! -e $name_local)
+                {
+                    $minimyth->message_output('err', qq(failed to fetch  
MiniMyth read-only configuration file ') . $name_remote . qq('));
+                    $success = 0;
+                }
+                else
+                {
+                    $minimyth->message_log('info', qq(fetched MiniMyth  
read-only configuration file ') . $name_remote . qq('));
+                    $minimyth->message_log('info', qq(  by fetching ') .  
$result . qq('));
+                    $minimyth->message_log('info', qq(  to local file ') .  
$name_local . qq('.));
+                    chmod(oct($mode_local), $name_local);
                  }
              }
          }
=======================================
---  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/hulu.pm
       
Wed Oct 14 14:59:08 2009
+++  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/hulu.pm
       
Sat Oct 17 20:12:08 2009
@@ -18,6 +18,25 @@
          $minimyth->message_output('info', "installing binary Hulu  
Desktop ...");
           
$minimyth->url_get($minimyth->var_get('MM_HULU_URL'), '/usr/bin/huludesktop');
      }
+
+    if ($minimyth->var_get('MM_HULU_STORE_HULUDESKTOP_DATA') eq 'yes')
+    {
+        my $name_remote = '/huludesktop.data';
+        my $name_local  = '/home/minimyth/.local/share/.huludesktop.data';
+        my $result = $minimyth->confrw_get($name_remote, $name_local);
+        if (! -e $name_local)
+        {
+            $minimyth->message_output('info', qq(failed to fetch MiniMyth  
read-write configuration file ') . $name_remote . qq('));
+        }
+        else
+        {
+            $minimyth->message_log('info', qq(fetched MiniMyth read-write  
configuration file ') . $name_remote . qq('));
+            $minimyth->message_log('info', qq(  by fetching ') . $result .  
qq('));
+            $minimyth->message_log('info', qq(  to local file ') .  
$name_local . qq('.));
+            chmod(oct('0644'), $name_local);
+        }
+    }
+
      if (-f '/usr/bin/huludesktop')
      {
          chmod(0755, '/usr/bin/huludesktop');

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to