Author: pebender
Date: Wed Jan 21 18:46:42 2009
New Revision: 4302

Modified:
    trunk/gar-minimyth/html/minimyth/document-changelog.txt
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/functions
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/acpi
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/audio
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/lcdproc
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/master
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/media
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/mythtv
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/security
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/video
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/x
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/mythtv.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/security.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/x.pm
    trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
    trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
    trunk/gar-minimyth/script/utils/busybox/checksums
    trunk/gar-minimyth/script/utils/busybox/files/busybox-1.11.3.config

Log:
- Changed how uid's and gid's are set so that we do not set uid's and
   gid's that are already correctly set. This reduces the number of files
   that are copied from the read-only branch to the read-write branch of
   the unionfs union.



Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt     (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt     Wed Jan 21  
18:46:42 2009
@@ -88,6 +88,10 @@
        unionfs union.
      - Changed tftp URLs from using tftp to using curl as the latest curl  
claims
        to fix the TFTP timeout bugs.
+    - Changed how uid's and gid's are set so that we do not set uid's and
+      gid's that are already correctly set. This reduces the number of  
files
+      that are copied from the read-only branch to the read-write branch of
+      the unionfs union.

  Modified udev
      - Renamed 06-minimyth-mythtv.rules to 07-minimyth-mythtv.rules.

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/functions
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/functions
        
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/functions
        
Wed Jan 21 18:46:42 2009
@@ -832,6 +832,27 @@
      return
  }

+
+mm_file_replace_variable() {
+    local file=$1
+    local var_name=$2
+    local var_value=$3
+
+    local mode
+    local uid
+    local gid
+
+    mode=`/bin/stat -c%a "${file}"`
+    uid=`/bin/stat -c%u "${file}"`
+    gid=`/bin/stat -c%g "${file}"`
+    /bin/sed -i "s%${var_name}%${var_value}%g" "${file}"
+    /bin/chmod ${mode} "${file}"
+    /bin/chown ${uid}:${gid} "${file}"
+
+    return
+}
+
+
  mm_var_get() {
      local VAR=$1


Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/acpi
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/acpi
      
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/acpi
      
Wed Jan 21 18:46:42 2009
@@ -10,13 +10,13 @@

      case "${MM_ACPI_EVENT_BUTTON_POWER}" in
          off)
-            /bin/sed  
-e 's...@mm_acpi_event_button_power@%/sbin/poweroff%'    -i  
/etc/acpi/events/power
+             
mm_file_replace_variable '/etc/acpi/events/power' 
'@MM_ACPI_EVENT_BUTTON_POWER@' '/sbin/poweroff'
              ;;
          sleep)
-            /bin/sed  
-e 's...@mm_acpi_event_button_power@%/usr/bin/mm_sleep%' -i  
/etc/acpi/events/power
+             
mm_file_replace_variable '/etc/acpi/events/power' 
'@MM_ACPI_EVENT_BUTTON_POWER@' '/usr/bin/mm_sleep'
              ;;
          none)
-            /bin/sed  
-e 's...@mm_acpi_event_button_power@%/bin/true%'         -i  
/etc/acpi/events/power
+             
mm_file_replace_variable '/etc/acpi/events/power' 
'@MM_ACPI_EVENT_BUTTON_POWER@' '/bin/true'
              ;;
      esac


Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/audio
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/audio
     
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/audio
     
Wed Jan 21 18:46:42 2009
@@ -15,8 +15,8 @@
      mm_message_output info "configuring audio ..."

      # Set audio card number and audio card device.
-    /bin/sed -i "s...@mm_audio_card_number@%${MM_AUDIO_CARD_NUMBER}%"      
/etc/asound.conf
-    /bin/sed -i "s...@mm_audio_device_number@%${MM_AUDIO_DEVICE_NUMBER}%"  
/etc/asound.conf
+     
mm_file_replace_variable '/etc/asound.conf' '@MM_AUDIO_CARD_NUMBER@'   
"${MM_AUDIO_CARD_NUMBER}"
+     
mm_file_replace_variable '/etc/asound.conf' '@MM_AUDIO_DEVICE_NUMBER@' 
"${MM_AUDIO_DEVICE_NUMBER}"

      # Wait for audio driver to load.
      timeout=10
@@ -31,10 +31,10 @@

      # Configure Xine audio.
      if /bin/echo "+${MM_AUDIO_TYPE}+" | /bin/grep -q '+digital+' ; then
-        /bin/sed -i 's...@speaker_arrangement@%Pass Through%'  
/home/minimyth/.xine/config
+         
mm_file_replace_variable '/home/minimyth/.xine/config' '@SPEAKER_ARRANGEMENT@' 
'Pass  
Through%'
      fi
      if /bin/echo "+${MM_AUDIO_TYPE}+" | /bin/grep -q '+analog+'  ; then
-        /bin/sed -i 's...@speaker_arrangement@%Stereo 2.0%'    
/home/minimyth/.xine/config
+         
mm_file_replace_variable '/home/minimyth/.xine/config' '@SPEAKER_ARRANGEMENT@' 
'Stereo  
2.0'
      fi

      # Unmute audio.

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/lcdproc
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/lcdproc
   
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/lcdproc
   
Wed Jan 21 18:46:42 2009
@@ -38,8 +38,8 @@

          if /usr/bin/test -e /etc/LCDd.conf ; then
              # Set the driver and device.
-            /bin/sed -i "s...@mm_lcdproc_driver@%${MM_LCDPROC_DRIVER}%"  
/etc/LCDd.conf
-            /bin/sed -i "s...@mm_lcdproc_device@%${MM_LCDPROC_DEVICE}%"  
/etc/LCDd.conf
+             
mm_file_replace_variable '/etc/LCDd.conf' '@MM_LCDPROC_DRIVER@' 
"${MM_LCDPROC_DRIVER}"
+             
mm_file_replace_variable '/etc/LCDd.conf' '@MM_LCDPROC_DEVICE@' 
"${MM_LCDPROC_DEVICE}"
              # Start LCDproc LCDd daemon and Myth LCD server.
              /usr/sbin/LCDd -c /etc/LCDd.conf
          fi

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/master
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/master
    
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/master
    
Wed Jan 21 18:46:42 2009
@@ -24,30 +24,30 @@
      MASTER_WOL_BROADCAST=`/sbin/ifconfig ${MM_NETWORK_INTERFACE} |  
/bin/grep ' Bcast:' | /bin/sed 's%.* Bcast:\([^ ]*\) .*%\1%'`

      # Configure config.xml file.
-    /bin/sed  
-i "s...@mm_hostname@%${HOSTNAME}%"                                             
    
/home/minimyth/.mythtv/config.xml
-    /bin/sed  
-i "s...@mm_master_server@%${MM_MASTER_SERVER}%"                                
    
/home/minimyth/.mythtv/config.xml
-    /bin/sed  
-i "s...@mm_master_dbusername@%${MM_MASTER_DBUSERNAME}%"                        
    
/home/minimyth/.mythtv/config.xml
-    /bin/sed  
-i "s...@mm_master_dbpassword@%${MM_MASTER_DBPASSWORD}%"                        
    
/home/minimyth/.mythtv/config.xml
-    /bin/sed  
-i "s...@mm_master_dbname@%${MM_MASTER_DBNAME}%"                                
    
/home/minimyth/.mythtv/config.xml
+     
mm_file_replace_variable '/home/minimyth/.mythtv/config.xml' '@MM_HOSTNAME@'    
      "${HOSTNAME}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/config.xml' 
'@MM_MASTER_SERVER@'     "${MM_MASTER_SERVER}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/config.xml' 
'@MM_MASTER_DBUSERNAME@' "${MM_MASTER_DBUSERNAME}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/config.xml' 
'@MM_MASTER_DBPASSWORD@' "${MM_MASTER_DBPASSWORD}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/config.xml' 
'@MM_MASTER_DBNAME@'     "${MM_MASTER_DBNAME}"

      # Configure mysql.txt file.
-    /bin/sed  
-i "s...@mm_hostname@%${HOSTNAME}%"                                             
    
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_server@%${MM_MASTER_SERVER}%"                                
    
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_dbusername@%${MM_MASTER_DBUSERNAME}%"                        
    
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_dbpassword@%${MM_MASTER_DBPASSWORD}%"                        
    
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_dbname@%${MM_MASTER_DBNAME}%"                                
    
/home/minimyth/.mythtv/mysql.txt
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' '@MM_HOSTNAME@'     
     "${HOSTNAME}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_SERVER@'     "${MM_MASTER_SERVER}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_DBUSERNAME@' "${MM_MASTER_DBUSERNAME}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_DBPASSWORD@' "${MM_MASTER_DBPASSWORD}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_DBNAME@'     "${MM_MASTER_DBNAME}"
      if /usr/bin/test "${MM_MASTER_WOL_ENABLED}" = "yes" ; then
-        /bin/sed  
-i "s...@mm_master_wol_false@%\#%"                                              
/home/minimyth/.mythtv/mysql.txt
-        /bin/sed  
-i "s...@mm_master_wol_true@%%"                                                 
/home/minimyth/.mythtv/mysql.txt
+         
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOL_FALSE@' '\#'
+         
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOL_TRUE@'  ''
      else
-        /bin/sed  
-i "s...@mm_master_wol_false@%%"                                                
/home/minimyth/.mythtv/mysql.txt
-        /bin/sed  
-i "s...@mm_master_wol_true@%\#%"                                               
/home/minimyth/.mythtv/mysql.txt
+         
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOL_FALSE@' ''
+         
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOL_TRUE@'  '\#%'
      fi
-    /bin/sed  
-i 
"s...@mm_master_wolsqlreconnectwaittime@%${MM_MASTER_WOLSQLRECONNECTWAITTIME}%" 
 
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_wolsqlconnectretry@%${MM_MASTER_WOLSQLCONNECTRETRY}%"        
    
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_wolsqlcommand@%${MM_MASTER_WOLSQLCOMMAND}%"                  
    
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_wol_broadcast@%${MASTER_WOL_BROADCAST}%"                     
    
/home/minimyth/.mythtv/mysql.txt
-    /bin/sed  
-i "s...@mm_master_wol_mac@%${MM_MASTER_WOL_MAC}%"                              
    
/home/minimyth/.mythtv/mysql.txt
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOLSQLRECONNECTWAITTIME@' "${MM_MASTER_WOLSQLRECONNECTWAITTIME}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOLSQLCONNECTRETRY@'      "${MM_MASTER_WOLSQLCONNECTRETRY}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOLSQLCOMMAND@'           "${MM_MASTER_WOLSQLCOMMAND}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOL_BROADCAST@'           "${MASTER_WOL_BROADCAST}"
+     
mm_file_replace_variable '/home/minimyth/.mythtv/mysql.txt' 
'@MM_MASTER_WOL_MAC@'                 "${MM_MASTER_WOL_MAC}"

      # If using wake-on-lan, then make sure that the MythTV master backend  
is awake.
      if /usr/bin/test "${MM_MASTER_WOL_ENABLED}" = "yes" && !  
mm_mythdb_test ; then

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/media
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/media
     
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/media
     
Wed Jan 21 18:46:42 2009
@@ -108,7 +108,7 @@
          fi
      done

-    /bin/sed  
-i "s...@media_files_origin_path@%${MM_MEDIA_VIDEO_MOUNTPOINT}%"  
/home/minimyth/.xine/config
+     
mm_file_replace_variable '/home/minimyth/.xine/config' 
'@MEDIA_FILES_ORIGIN_PATH@' "${MM_MEDIA_VIDEO_MOUNTPOINT}"

      return 0
  }

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/mythtv
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/mythtv
    
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/mythtv
    
Wed Jan 21 18:46:42 2009
@@ -77,6 +77,15 @@
      # Mount themecache directory.
      if /usr/bin/test -n "${MM_THEMECACHE_URL}" ; then
           
mm_url_mount "${MM_THEMECACHE_URL}" "/home/minimyth/.mythtv/themecache"
+        # Make sure that uid and gid are for user 'minimyth'.
+        if /usr/bin/test ! `/bin/stat  
-c%U,%G "/home/minimyth/.mythtv/themecache"` = 'minimyth,minimyth' ; then
+            /bin/chown minimyth:minimyth /home/minimyth/.mythtv/themecache
+        fi
+        for file in `/bin/ls -1d "/home/minimyth/.mythtv/themecache/*"` ;  
do
+            if /usr/bin/test ! `/bin/stat -c%U,%G "${file}"`  
= 'minimyth,minimyth' ; then
+                /bin/chown -Rh minimyth:minimyth "${file}"
+            fi
+        done
      fi

      # Configure MythVideo DVD ripping.
@@ -147,12 +156,14 @@

      # Delete disabled plugins.
      if /usr/bin/test "${MM_PLUGIN_INFORMATION_CENTER_ENABLED}" = "no" ;  
then
-        /bin/sed -i  
-e 
's%<type>MENU_INFO_CENTER</type>%<type>MENU_INFO_CENTER</type><depends></depends>%'
  
\
-            /usr/share/mythtv/mainmenu.xml
+        mm_file_replace_variable '/usr/share/mythtv/mainmenu.xml' \
+            '<type>MENU_INFO_CENTER</type>' \
+            '<type>MENU_INFO_CENTER</type><depends></depends>'
      fi
      if /usr/bin/test "${MM_PLUGIN_OPTICAL_DISK_ENABLED}" = "no" ; then
-        /bin/sed -i -e 's%<depends>mythmusic mythvideo mytharchive  
mythburn</depends>%<depends>disabled</depends>%' \
-            /usr/share/mythtv/mainmenu.xml
+        mm_file_replace_variable '/usr/share/mythtv/mainmenu.xml' \
+            '<depends>mythmusic mythvideo mytharchive mythburn</depends>' \
+            '<depends>disabled</depends>'
      fi
      if /usr/bin/test "${MM_PLUGIN_BROWSER_ENABLED}"     = "no" ; then
          /bin/rm -rf /usr/lib/mythtv/plugins/libmythbookmarkmanager.so

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/security
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/security
  
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/security
  
Wed Jan 21 18:46:42 2009
@@ -8,13 +8,21 @@

  start() {

-    /bin/sed  
-e 
"s%^minimyth::1000:1000:%minimyth::${MM_SECURITY_USER_MINIMYTH_UID}:${MM_SECURITY_USER_MINIMYTH_GID}:%"
  
\
-             -i /etc/passwd
-    /bin/sed  
-e "s%^minimyth:x:1000:%minimyth:x:${MM_SECURITY_USER_MINIMYTH_GID}:%" \
-             -i /etc/group
+    mm_file_replace_variable '/etc/passwd' \
+        '^minimyth::1000:1000:' \
+        
"minimyth::${MM_SECURITY_USER_MINIMYTH_UID}:${MM_SECURITY_USER_MINIMYTH_GID}:"
+    mm_file_replace_variable '/etc/group' \
+        '^minimyth:x:1000:' \
+        "minimyth:x:${MM_SECURITY_USER_MINIMYTH_GID}:"
+
+    # Make sure that uid and gid for the home directory of user 'minimyth'  
are correct.
+    /usr/bin/find /home/minimyth -depth |
+    while read file ; do
+        if /usr/bin/test ! `/bin/stat -c%U,%G "${file}"`  
= 'minimyth,minimyth' ; then
+            /bin/chown minimyth:minimyth "${file}"
+        fi
+    done

-    # Make sure that uid and gid are for the home directory of  
user 'minimyth' are correct.
-    /bin/chown -Rh minimyth:minimyth /home/minimyth

      if /usr/bin/test -e /etc/ssl/certs/ca-bundle.crt ; then
          # Set permissions.

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/video
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/video
     
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/video
     
Wed Jan 21 18:46:42 2009
@@ -33,31 +33,31 @@
              /usr/bin/test "${MM_VIDEO_DEINTERLACER}" = "auto" &&  
MM_VIDEO_DEINTERLACER='bobdeint'
              XVMC_LIB='/usr/lib/libI810XvMC.so.1'  && \
                  /usr/bin/test -e ${XVMC_LIB}      && \
-                /bin/sed -i "s...@mm_xvmc_lib@%${XVMC_LIB}%"  
/etc/X11/XvMCConfig
+                 
mm_file_replace_variable '/etc/X11/XvMCConfig' '@MM_XVMC_LIB@' "${XVMC_LIB}"
              ;;
          intel_915)
              /usr/bin/test "${MM_VIDEO_DECODER}"      = "auto" &&  
MM_VIDEO_DECODER='ffmpeg'
              /usr/bin/test "${MM_VIDEO_DEINTERLACER}" = "auto" &&  
MM_VIDEO_DEINTERLACER='bobdeint'
              XVMC_LIB='/usr/lib/libIntelXvMC.so.1' && \
                  /usr/bin/test -e ${XVMC_LIB}      && \
-                /bin/sed -i "s...@mm_xvmc_lib@%${XVMC_LIB}%"  
/etc/X11/XvMCConfig
+                 
mm_file_replace_variable '/etc/X11/XvMCConfig' '@MM_XVMC_LIB@' "${XVMC_LIB}"
              ;;
          nvidia)
              /usr/bin/test "${MM_VIDEO_DECODER}"      = "auto" &&  
MM_VIDEO_DECODER='ffmpeg'
              /usr/bin/test "${MM_VIDEO_DEINTERLACER}" = "auto" &&  
MM_VIDEO_DEINTERLACER='bobdeint'
              XVMC_LIB='/usr/lib/nvidia/libXvMCNVIDIA.so.1'         && \
                  /usr/bin/test -e ${XVMC_LIB}                      && \
-                /bin/sed -i "s...@mm_xvmc_lib@%${XVMC_LIB}%"  
/etc/X11/XvMCConfig
+                 
mm_file_replace_variable '/etc/X11/XvMCConfig' '@MM_XVMC_LIB@' "${XVMC_LIB}"
              XVMC_LIB='/usr/lib/nvidia/libXvMCNVIDIA_dynamic.so.1' && \
                  /usr/bin/test -e ${XVMC_LIB}                      && \
-                /bin/sed -i "s...@mm_xvmc_lib@%${XVMC_LIB}%"  
/etc/X11/XvMCConfig
+                 
mm_file_replace_variable '/etc/X11/XvMCConfig' '@MM_XVMC_LIB@' "${XVMC_LIB}"
              ;;
          openchrome)
              /usr/bin/test "${MM_VIDEO_DECODER}"      = "auto" &&  
MM_VIDEO_DECODER='xvmc-vld'
              /usr/bin/test "${MM_VIDEO_DEINTERLACER}" = "auto" &&  
MM_VIDEO_DEINTERLACER='bobdeint'
              XVMC_LIB='/usr/lib/libchromeXvMC.so.1' && \
                  /usr/bin/test -e ${XVMC_LIB}       && \
-                /bin/sed -i "s...@mm_xvmc_lib@%${XVMC_LIB}%"  
/etc/X11/XvMCConfig
+                 
mm_file_replace_variable '/etc/X11/XvMCConfig' '@MM_XVMC_LIB@' "${XVMC_LIB}"
              ;;
          radeon)
              /usr/bin/test "${MM_VIDEO_DECODER}"      = "auto" &&  
MM_VIDEO_DECODER='ffmpeg'
@@ -80,7 +80,7 @@
              /usr/bin/test "${MM_VIDEO_DEINTERLACER}" = "auto" &&  
MM_VIDEO_DEINTERLACER='bobdeint'
              ;;
      esac
-    /bin/sed -i "s...@mm_xvmc_lib@%%" /etc/X11/XvMCConfig
+    mm_file_replace_variable '/etc/X11/XvMCConfig' '@MM_XVMC_LIB@' ''

      if ( /usr/bin/test ${MM_VERSION_MYTH_BINARY_MAJOR} -eq  0 && \
           /usr/bin/test ${MM_VERSION_MYTH_BINARY_MINOR} -eq 20    ) ; then
@@ -216,43 +216,43 @@
      case "${MM_VIDEO_DECODER}" in
          ffmpeg)
              /usr/bin/test ! -e /usr/bin/mplayer && /usr/bin/test -e  
/usr/bin/mplayer-svn && /bin/ln -s mplayer-svn /usr/bin/mplayer
-            /bin/sed -i "s...@video_driver@%xv%"     
/home/minimyth/.xine/config
-            /bin/sed -i "s...@vdpau_true@%\#%"       
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@vdpau_false@%%"        
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_true@%\#%"        
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_false@%%"         
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    '@VIDEO_DRIVER@' 'xv'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_TRUE@'   '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_FALSE@'  ''
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_TRUE@'    '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_FALSE@'   ''
              ;;
          libmpeg2)
              /usr/bin/test ! -e /usr/bin/mplayer && /usr/bin/test -e  
/usr/bin/mplayer-svn && /bin/ln -s mplayer-svn /usr/bin/mplayer
-            /bin/sed -i "s...@video_driver@%xv%"     
/home/minimyth/.xine/config
-            /bin/sed -i "s...@vdpau_true@%\#%"       
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@vdpau_false@%%"        
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_true@%\#%"        
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_false@%%"         
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    '@VIDEO_DRIVER@' 'xv'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_TRUE@'   '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_FALSE@'  ''
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_TRUE@'    '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_FALSE@'   ''
              ;;
          vdpau)
              /usr/bin/test ! -e /usr/bin/mplayer && /usr/bin/test -e  
/usr/bin/mplayer-svn && /bin/ln -s mplayer-svn /usr/bin/mplayer
-            /bin/sed -i "s...@video_driver@%vdpau%"  
/home/minimyth/.xine/config
-            /bin/sed -i "s...@vdpau_true@%%"         
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@vdpau_false@%\#%"      
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_true@%\#%"        
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_false@%%"         
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    '@VIDEO_DRIVER@' 
'vdpau'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_TRUE@'   ''
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_FALSE@'  '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_TRUE@'    '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_FALSE@'   ''
              ;;
          xvmc)
              /usr/bin/test ! -e /usr/bin/mplayer && /usr/bin/test -e  
/usr/bin/mplayer-svn && /bin/ln -s mplayer-svn /usr/bin/mplayer
-            /bin/sed -i "s...@video_driver@%xvmc%"   
/home/minimyth/.xine/config
-            /bin/sed -i "s...@vdpau_true@%\#%"       
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@vdpau_false@%%"        
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_true@%%"          
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_false@%\#%"       
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    '@VIDEO_DRIVER@' 
'xvmc'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_TRUE@'   '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_FALSE@'  ''
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_TRUE@'    ''
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_FALSE@'   '\#'
              ;;
          xvmc-vld)
              /usr/bin/test ! -e /usr/bin/mplayer && /usr/bin/test -e  
/usr/bin/mplayer-vld && /bin/ln -s mplayer-vld /usr/bin/mplayer
-            /bin/sed -i "s...@video_driver@%xxmc%"   
/home/minimyth/.xine/config
-            /bin/sed -i "s...@vdpau_true@%\#%"       
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@vdpau_false@%%"        
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_true@%%"          
/home/minimyth/.mplayer/config
-            /bin/sed -i "s...@xvmc_false@%\#%"       
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    '@VIDEO_DRIVER@' 
'xxmc'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_TRUE@'   '\#'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@VDPAU_FALSE@'  ''
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_TRUE@'    ''
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@XVMC_FALSE@'   '\#'
              ;;
          *)
              mm_message_output err "error: something is very wrong in  
the 'video' init script."
@@ -262,28 +262,28 @@

      case "${MM_VIDEO_DEINTERLACER}" in
          none)
-            /bin/sed  
-i "s...@deinterlace_by_default@%0%"                      
/home/minimyth/.xine/config
-            /bin/sed  
-i "s...@deinterlace_plugin@%none%"                       
/home/minimyth/.xine/config
-            /bin/sed  
-i "s...@bobdeint@%%"                                     
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    
'@DEINTERLACE_BY_DEFAULT@' '0'
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    
'@DEINTERLACE_PLUGIN@'     'none'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@BOBDEINT@'          
     ''
              ;;
          bobdeint|openglbobdeint|vdpaubobdeint)
-            /bin/sed  
-i "s...@deinterlace_by_default@%1%"                      
/home/minimyth/.xine/config
-            /bin/sed  
-i "s...@deinterlace_plugin@%tvtime:method=ScalerBob%"    
/home/minimyth/.xine/config
-            /bin/sed  
-i "s...@bobdeint@%:bobdeint%"                            
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    
'@DEINTERLACE_BY_DEFAULT@' '1'
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    
'@DEINTERLACE_PLUGIN@'     'tvtime:method=ScalerBob%'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@BOBDEINT@'          
     ':bobdeint'
              ;;
          *)
-            /bin/sed  
-i "s...@deinterlace_by_default@%1%"                      
/home/minimyth/.xine/config
-            /bin/sed  
-i "s...@deinterlace_plugin@%tvtime:method=LinearBlend%"  
/home/minimyth/.xine/config
-            /bin/sed  
-i "s...@bobdeint@%%"                                     
/home/minimyth/.mplayer/config
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    
'@DEINTERLACE_BY_DEFAULT@' '1'
+             
mm_file_replace_variable '/home/minimyth/.xine/config'    
'@DEINTERLACE_PLUGIN@'     'tvtime:method=LinearBlend'
+             
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@BOBDEINT@'          
     ''
              ;;
      esac

      if   /usr/bin/test "${MM_VIDEO_ASPECT_RATIO}" = "4:3"   ; then
-        /bin/sed -i "s...@monitoraspect@%4:3%"    
/home/minimyth/.mplayer/config
+         
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@MONITORASPECT@' 
'4:3'
      elif /usr/bin/test "${MM_VIDEO_ASPECT_RATIO}" = "16:9"  ; then
-        /bin/sed -i "s...@monitoraspect@%16:9%"   
/home/minimyth/.mplayer/config
+         
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@MONITORASPECT@' 
'16:9'
      elif /usr/bin/test "${MM_VIDEO_ASPECT_RATIO}" = "16:10" ; then
-        /bin/sed -i "s...@monitoraspect@%16:10%"  
/home/minimyth/.mplayer/config
+         
mm_file_replace_variable '/home/minimyth/.mplayer/config' '@MONITORASPECT@' 
'16:10'
      else
          mm_message_output err "error: something is very wrong in  
the 'video' init script."
          exit 1
@@ -382,29 +382,29 @@
               | /bin/grep -e '^flags *:' \
               | /bin/sed -e 's%^flags *:%%' -e 's%  *% %g' -e 's%^ %%'  
-e 's% $%%'`
          if /bin/echo " ${cpu_flags} " | /bin/grep -q ' 3dnow '  >  
/dev/null 2>&1 ; then
-            /bin/sed -e 's...@mm_vlc_vlcrc_3dn@%1%g'    -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_3DN@'    '1'
          else
-            /bin/sed -e 's...@mm_vlc_vlcrc_3dn@%0%g'    -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_3DN@'    '0'
          fi
          if /bin/echo " ${cpu_flags} " | /bin/grep -q ' mmx '    >  
/dev/null 2>&1 ; then
-            /bin/sed -e 's...@mm_vlc_vlcrc_mmx@%1%g'    -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_MMX@'    '1'
          else
-            /bin/sed -e 's...@mm_vlc_vlcrc_mmx@%0%g'    -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_MMX@'    '0'
          fi
          if /bin/echo " ${cpu_flags} " | /bin/grep -q ' mmxext ' >  
/dev/null 2>&1 ; then
-            /bin/sed -e 's...@mm_vlc_vlcrc_mmxext@%1%g' -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_MMXEXT@' '1'
          else
-            /bin/sed -e 's...@mm_vlc_vlcrc_mmxext@%0%g' -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_MMXEXT@' '0'
          fi
          if /bin/echo " ${cpu_flags} " | /bin/grep -q ' sse '    >  
/dev/null 2>&1 ; then
-            /bin/sed -e 's...@mm_vlc_vlcrc_sse@%1%g'    -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_SSE@'    '1'
          else
-            /bin/sed -e 's...@mm_vlc_vlcrc_sse@%0%g'    -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_SSE@'    '0'
          fi
          if /bin/echo " ${cpu_flags} " | /bin/grep -q ' sse2 '   >  
/dev/null 2>&1 ; then
-            /bin/sed -e 's...@mm_vlc_vlcrc_sse2@%1%g'   -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_SSE2@'   '1'
          else
-            /bin/sed -e 's...@mm_vlc_vlcrc_sse2@%0%g'   -i  
/home/minimyth/.config/vlc/vlcrc
+             
mm_file_replace_variable '/home/minimyth/.config/vlc/vlcrc' 
'@MM_VLC_VLCRC_SSE2@'   '0'
          fi
      fi


Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/x
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/x
         
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/x
         
Wed Jan 21 18:46:42 2009
@@ -35,20 +35,20 @@
      /bin/chown root:root  /tmp/.ICE-unix/

      if   /usr/bin/test "${MM_X_SCREENSAVER_HACK}" = "sleep"       ; then
-        /bin/sed -i 's...@mode@%blank%' /home/minimyth/.xscreensaver
-        /bin/sed -i 's...@selected@%0%' /home/minimyth/.xscreensaver
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@MODE@'     'blank'
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@SELECTED@' '0'
      elif /usr/bin/test "${MM_X_SCREENSAVER_HACK}" = "blank"       ; then
-        /bin/sed -i 's...@mode@%blank%' /home/minimyth/.xscreensaver
-        /bin/sed -i 's...@selected@%0%' /home/minimyth/.xscreensaver
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@MODE@'     'blank'
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@SELECTED@' '0'
      elif /usr/bin/test "${MM_X_SCREENSAVER_HACK}" = "glslideshow" ; then
-        /bin/sed -i 's...@mode@%one%'   /home/minimyth/.xscreensaver
-        /bin/sed -i 's...@selected@%1%' /home/minimyth/.xscreensaver
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@MODE@'     'one'
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@SELECTED@' '1'
      else
-        /bin/sed -i 's...@mode@%blank%' /home/minimyth/.xscreensaver
-        /bin/sed -i 's...@selected@%0%' /home/minimyth/.xscreensaver
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@MODE@'     'blank'
+         
mm_file_replace_variable '/home/minimyth/.xscreensaver' '@SELECTED@' '0'
      fi
-    /bin/sed  
-i "s...@mm_x_screensaver_timeout@%${MM_X_SCREENSAVER_TIMEOUT}%"    
/home/minimyth/.xscreensaver
-    /bin/sed  
-i "s...@mm_media_gallery_mountpoint@%${MM_MEDIA_GALLERY_MOUNTPOINT}%"  
/home/minimyth/.xscreensaver
+     
mm_file_replace_variable '/home/minimyth/.xscreensaver' 
'@MM_X_SCREENSAVER_TIMEOUT@'    "${MM_X_SCREENSAVER_TIMEOUT}"
+     
mm_file_replace_variable '/home/minimyth/.xscreensaver' 
'@MM_MEDIA_GALLERY_MOUNTPOINT@' "${MM_MEDIA_GALLERY_MOUNTPOINT}"

      X_DISPLAYSIZE_X=`/bin/echo ${MM_X_DISPLAYSIZE} | /bin/sed  
-e 's%^\([0-9][0-9]*\)x\([0-9][0-9]*\).*%\1%'`
      X_DISPLAYSIZE_Y=`/bin/echo ${MM_X_DISPLAYSIZE} | /bin/sed  
-e 's%^\([0-9][0-9]*\)x\([0-9][0-9]*\).*%\2%'`
@@ -266,34 +266,31 @@
          MOUSE_TRUE=''
      fi

-    /bin/sed -i "s...@inputdevice_event@%${INPUTDEVICE_EVENT}%"    
/etc/X11/xorg.conf
-    /bin/sed -i "s...@serverlayout_event@%${SERVERLAYOUT_EVENT}%"  
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_driver@%${MM_X_DRIVER}%"                
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_device_intel@%${MM_X_DEVICE_INTEL}%"    
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_device_nvidia@%${MM_X_DEVICE_NVIDIA}%"  
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_device_via@%${MM_X_DEVICE_VIA}%"        
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_tv_type@%${MM_X_TV_TYPE}%"              
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_tv_output@%${MM_X_TV_OUTPUT}%"          
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_tv_overscan@%${MM_X_TV_OVERSCAN}%"      
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_sync@%${MM_X_SYNC}%"                    
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_refresh@%${MM_X_REFRESH}%"              
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_modeline@%${MM_X_MODELINE}%"            
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_modeline_0@%${MM_X_MODELINE_0}%"        
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_modeline_1@%${MM_X_MODELINE_1}%"        
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_modeline_2@%${MM_X_MODELINE_2}%"        
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_mode@%${MM_X_MODE}%"                    
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_mode_0@%${MM_X_MODE_0}%"                
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_mode_1@%${MM_X_MODE_1}%"                
/etc/X11/xorg.conf
-    /bin/sed -i "s...@mm_x_mode_2@%${MM_X_MODE_2}%"                
/etc/X11/xorg.conf
-    /bin/sed -i "s...@x_displaysize_x@%${X_DISPLAYSIZE_X}%"        
/etc/X11/xorg.conf
-    /bin/sed -i "s...@x_displaysize_y@%${X_DISPLAYSIZE_Y}%"        
/etc/X11/xorg.conf
-    /bin/sed -i "s...@x_virtual_x@%${X_VIRTUAL_X}%"                
/etc/X11/xorg.conf
-    /bin/sed -i "s...@x_virtual_y@%${X_VIRTUAL_Y}%"                
/etc/X11/xorg.conf
-    /bin/sed -i "s...@dri_true@%${DRI_TRUE}%"                      
/etc/X11/xorg.conf
-    /bin/sed -i "s...@nvidia_true@%${NVIDIA_TRUE}%"                
/etc/X11/xorg.conf
-
-    # Make sure that the file ownership is correct.
-    /bin/chown -Rh minimyth:minimyth /home/minimyth
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@INPUTDEVICE_EVENT@'  
"${INPUTDEVICE_EVENT}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@SERVERLAYOUT_EVENT@' 
"${SERVERLAYOUT_EVENT}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_DRIVER@'        
"${MM_X_DRIVER}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_DEVICE_INTEL@'  
"${MM_X_DEVICE_INTEL}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_DEVICE_NVIDIA@' 
"${MM_X_DEVICE_NVIDIA}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_DEVICE_VIA@'    
"${MM_X_DEVICE_VIA}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_TV_TYPE@'       
"${MM_X_TV_TYPE}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_TV_OUTPUT@'     
"${MM_X_TV_OUTPUT}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_TV_OVERSCAN@'   
"${MM_X_TV_OVERSCAN}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_SYNC@'          
"${MM_X_SYNC}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_REFRESH@'       
"${MM_X_REFRESH}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODELINE@'      
"${MM_X_MODELINE}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODELINE_0@'    
"${MM_X_MODELINE_0}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODELINE_1@'    
"${MM_X_MODELINE_1}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODELINE_2@'    
"${MM_X_MODELINE_2}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODE@'          
"${MM_X_MODE}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODE_0@'        
"${MM_X_MODE_0}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODE_1@'        
"${MM_X_MODE_1}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@MM_X_MODE_2@'        
"${MM_X_MODE_2}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@X_DISPLAYSIZE_X@'    
"${X_DISPLAYSIZE_X}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@X_DISPLAYSIZE_Y@'    
"${X_DISPLAYSIZE_Y}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@X_VIRTUAL_X@'        
"${X_VIRTUAL_X}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@X_VIRTUAL_Y@'        
"${X_VIRTUAL_Y}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@DRI_TRUE@'           
"${DRI_TRUE}"
+     
mm_file_replace_variable '/etc/X11/xorg.conf' '@NVIDIA_TRUE@'        
"${NVIDIA_TRUE}"

      mm_message_output info "starting X ..."
      mm_x_start

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/mythtv.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/mythtv.pm
      
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/mythtv.pm
      
Wed Jan 21 18:46:42 2009
@@ -83,6 +83,33 @@
      if ($themecache_url)
      {
           
$minimyth->url_mount($themecache_url, '/home/minimyth/.mythtv/themecache');
+        # Make sure that uid and gid are for user 'minimyth'.
+        # Make sure that the file ownership is correct.
+        my $uid = getpwnam('minimyth');
+        my $gid = getgrnam('minimyth');
+        if (((stat('/home/minimyth/.mythtv/themecache'))[4] != $uid) ||  
((stat(_))[5] != $gid))
+        {
+            chown($uid, $gid, '/home/minimyth/.mythtv/themecache');
+        }
+        if (opendir(DIR, '/home/minimyth/.mythtv/themecache'))
+        {
+            while (my $themecache = readdir(DIR))
+            {
+                if (((stat($themecache))[4] != $uid) || ((stat(_))[5] !=  
$gid))
+                {
+                    File::Find::finddepth(
+                        sub
+                        {
+                            if (((stat($File::Find::name))[4] != $uid) ||  
((stat(_))[5] != $gid))
+                            {
+                                chown($uid, $gid, $File::Find::name);
+                            }
+                        },
+                        $themecache);
+                }
+            }
+            closedir(DIR);
+        }
      }

      # Configure MythVideo DVD ripping.

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/security.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/security.pm
    
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/security.pm
    
Wed Jan 21 18:46:42 2009
@@ -23,14 +23,17 @@
          '/etc/group',
          { 'minimyth:x:1000:' => "minimyth:x:$user_minimyth_gid:" });

-    # Make sure that uid and gid are for the home directory of  
user 'minimyth' are correct.
+    # Make sure that uid and gid for the home directory of user 'minimyth'  
are correct.
      {
          my $uid = getpwnam('minimyth');
          my $gid = getgrnam('minimyth');
          File::Find::finddepth(
              sub
              {
-                chown($uid, $gid, $File::Find::name);
+                if (((stat($File::Find::name))[4] != $uid) ||  
((stat(_))[5] != $gid))
+                {
+                    chown($uid, $gid, $File::Find::name);
+                }
              },
              '/home/minimyth');
      }

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/x.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/x.pm  
 
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/x.pm  
 
Wed Jan 21 18:46:42 2009
@@ -395,18 +395,6 @@
            '@DRI_TRUE@'           =>  
$dri_true                              ,
            '@NVIDIA_TRUE@'        =>  
$nvidia_true                            });

-    # Make sure that the file ownership is correct.
-    {
-        my $uid = getpwnam('minimyth');
-        my $gid = getgrnam('minimyth');
-        File::Find::finddepth(
-            sub
-            {
-                chown($uid, $gid, $File::Find::name);
-            },
-            '/home/minimyth');
-    }
-
      $minimyth->message_output('info', "starting X ...");
      $minimyth->x_start();


Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums      (original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums      Wed Jan 21  
18:46:42 2009
@@ -1 +1 @@
-9c7e3e8dd3b9b2bb35cc33d7faed10fe  download/MiniMyth.pm
+c0a89c740daf3662253f1d21e0ea3c2b  download/MiniMyth.pm

Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm       
(original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm      Wed Jan 
 
21 18:46:42 2009
@@ -1615,9 +1615,12 @@
      my $vars  = shift;

      my $mode = (stat($file))[2];
+    my $uid  = (stat(_))[4];
+    my $gid  = (stat(_))[5];
      if ((! -e "$file.$$") && (open(OFILE, '>', "$file.$$")))
      {
          chmod($mode, "$file.$$");
+        chown($uid, $gid, "$file.$$");
          if ((-r "$file") && (open(IFILE, '<', "$file")))
          {
              while (<IFILE>)
@@ -1814,7 +1817,7 @@
          "$local_dir/$codecs_base");

      unlink(qq($local_file));
-    if (system(qq(/usr/bin/fakeroot  
/usr/bin/mksquashfs "$local_dir/$codecs_base" "$local_file" -no-sparse  
-no-exports -no-progress -no-sparse -b 64k -processors 1 -check_data  
> "$devnull" 2>&1)) != 0)
+    if (system(qq(/usr/bin/fakeroot  
/usr/bin/mksquashfs "$local_dir/$codecs_base" "$local_file" -no-sparse  
-no-exports -no-progress -no-sparse -b 64k -processors 1 -check_data  
-force-uid 0 -force-gid 0 > "$devnull" 2>&1)) != 0)
      {
          File::Path::rmtree(qq($local_dir/$codecs_base));
          unlink(qq($local_file));
@@ -1955,7 +1958,7 @@
          return 0;
      }

-    if (system(qq(/usr/bin/fakeroot  
/usr/bin/mksquashfs '/usr/local' "$local_file" -no-sparse -no-exports  
-no-progress -no-sparse -b 64k -processors 1 -check_data > "$devnull"  
2>&1)) != 0)
+    if (system(qq(/usr/bin/fakeroot  
/usr/bin/mksquashfs '/usr/local' "$local_file" -no-sparse -no-exports  
-no-progress -no-sparse -b 64k -processors 1 -check_data -force-uid 0  
-force-gid 0 > "$devnull" 2>&1)) != 0)
      {
          unlink($local_file);
          $self->message_log('err', qq(failed to create the extras file  
because squashfs failed.));
@@ -1998,7 +2001,9 @@
          return 0;
      }

-    if (system(qq(/usr/bin/fakeroot  
/usr/bin/mksquashfs '/home/minimyth/.mythtv/themecache' "$local_file"  
-no-sparse -no-exports -no-progress -no-sparse -b 64k -processors 1  
-check_data > "$devnull" 2>&1)) != 0)
+    my $uid = getpwnam('minimyth');
+    my $gid = getgrnam('minimyth');
+    if (system(qq(/usr/bin/fakeroot  
/usr/bin/mksquashfs '/home/minimyth/.mythtv/themecache' "$local_file"  
-no-sparse -no-exports -no-progress -no-sparse -b 64k -processors 1  
-check_data -force-uid $uid -force-gid $gid > "$devnull" 2>&1)) != 0)
      {
          unlink($local_file);
          $self->message_log('err', qq(failed to create the MythTV  
themecache file because squashfs failed.));

Modified: trunk/gar-minimyth/script/utils/busybox/checksums
==============================================================================
--- trunk/gar-minimyth/script/utils/busybox/checksums   (original)
+++ trunk/gar-minimyth/script/utils/busybox/checksums   Wed Jan 21 18:46:42  
2009
@@ -2,4 +2,4 @@
  ce61a66858e59c2dcf1e670b1a80c6c4   
download/busybox-1.11.3-dhcp_options.patch
  7443fc5f3978eb5720ea870693805779   
download/busybox-1.11.3-dhcp_timezone.patch
  94a7f9b074f8379262ab2be6d018fc83   
download/busybox-1.11.3-tftp_timeout.patch
-2660a9fd41d9d5391decb69b043da66f  download/busybox-1.11.3.config
+98f1e3c93197b45d4ec9317768fe76c8  download/busybox-1.11.3.config

Modified:  
trunk/gar-minimyth/script/utils/busybox/files/busybox-1.11.3.config
==============================================================================
--- trunk/gar-minimyth/script/utils/busybox/files/busybox-1.11.3.config  
(original)
+++ trunk/gar-minimyth/script/utils/busybox/files/busybox-1.11.3.config Wed  
Jan 21 18:46:42 2009
@@ -1,7 +1,7 @@
  #
  # Automatically generated make config: don't edit
  # Busybox version: 1.11.3
-# Thu Jan  8 03:18:54 2009
+# Wed Jan 21 07:09:56 2009
  #
  CONFIG_HAVE_DOT_CONFIG=y

@@ -221,8 +221,8 @@
  CONFIG_FEATURE_SORT_BIG=y
  # CONFIG_SPLIT is not set
  # CONFIG_FEATURE_SPLIT_FANCY is not set
-# CONFIG_STAT is not set
-# CONFIG_FEATURE_STAT_FORMAT is not set
+CONFIG_STAT=y
+CONFIG_FEATURE_STAT_FORMAT=y
  # CONFIG_STTY is not set
  # CONFIG_SUM is not set
  CONFIG_SYNC=y

--~--~---------~--~----~------------~-------~--~----~
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