Changeset 555


Ignore:
Timestamp:
10/23/09 20:47:05 (2 years ago)
Author:
tschmitt
Message:
  • Paket:
    • Symlink zur obsoleten Datei /usr/sbin/repack-cloop entfernt.
    • Windows-7-Registry-Patch-Beispieldatei hinzugefügt.
  • Linbofs:
    • linbo_cmd.sh: o start(): APPEND-Variable für Windows 7 gefixt.
    • patch_registry.sh: o Handling der Gross-/Kleinschreibung von Registrypfaden gefixt. o Mehrere Fixes bzgl. Windows 7 Unterstützung.
Location:
main/linuxmuster-linbo/branches/testing
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • main/linuxmuster-linbo/branches/testing/debian/changelog

    r536 r555  
     1linuxmuster-linbo (1.99.11-0) unstable; urgency=low 
     2 
     3  * package: 
     4    - removed stale symlink to obsolete /usr/sbin/repack-cloop. 
     5    - added Windows 7 registry patch example file. 
     6  * linbofs: 
     7    - linbo_cmd.sh: 
     8      o start(): fixed APPEND variable for Windows 7's bootmgr. 
     9    - patch_registry.sh: 
     10      o fixed matching cases in key paths. 
     11      o more fixes according to Windows 7 registry. 
     12 
     13 -- Thomas Schmitt <schmitt@lmz-bw.de>  Fri, 23 Oct 2009 19:38:43 +0200 
     14 
    115linuxmuster-linbo (1.99.10-0) unstable; urgency=low 
    216 
  • main/linuxmuster-linbo/branches/testing/debian/links

    r530 r555  
    44usr/lib/linuxmuster-linbo/gpxe.krn      var/linbo/gpxe.krn 
    55usr/share/doc/linuxmuster-linbo/examples        var/linbo/examples 
    6 usr/share/linuxmuster-linbo/repack-cloop.sh usr/sbin/repack-cloop 
    76usr/share/linuxmuster-linbo/update-linbofs.sh usr/sbin/update-linbofs 
    87usr/share/linuxmuster-linbo/make-linbo-media.sh usr/sbin/make-linbo-media 
  • main/linuxmuster-linbo/branches/testing/linbo/linbo_cmd.sh

    r536 r555  
    575575  esac 
    576576  # provide a menu.lst for grldr on win2k/xp 
    577   if [ -e /mnt/[Nn][Tt][Ll][Dd][Rr] ]; then 
     577  if [ -e /mnt/[Bb][Oo][Oo][Tt][Mm][Gg][Rr] ]; then 
     578   mkgrldr "$1" "/bootmgr" 
     579   APPEND="$(echo $APPEND | sed -e 's/ntldr/bootmgr/')" 
     580  elif [ -e /mnt/[Nn][Tt][Ll][Dd][Rr] ]; then 
    578581   mkgrldr "$1" "/ntldr" 
    579   elif [ -e /mnt/[Bb][Oo][Oo][Tt][Mm][Gg][Rr] ]; then 
    580    mkgrldr "$1" "/bootmgr" 
    581582  elif [ -e /mnt/[Ii][Oo].[Ss][Yy][Ss] ]; then 
    582583   # tschmitt: patch autoexec.bat (win98), 
  • main/linuxmuster-linbo/branches/testing/linbo/patch_registry.sh

    r518 r555  
    77# 
    88# Thomas Schmitt <schmitt@lmz-bw.de> 
    9 # 20.04.2009 
     9# 23.10.2009 
    1010# 
    1111 
     
    5050} 
    5151 
     52# test_key basepath key (returns case sensitive key name or nothing) 
    5253test_key() { 
     54 local cmd="" 
     55 if [ -n "$1" ]; then 
     56  cmd="cd $1\nls\nq\ny\n" 
     57 else 
     58  cmd="ls\nq\ny\n" 
     59 fi 
     60 echo -e "$cmd" | chntpw -e "$hive" | grep -i "\<$2\>" | awk -F\< '{ print $2 }' | awk -F\> '{ print $1 }' 
     61} 
     62 
     63create_keypath() { 
    5364 local key="$1" 
    54  local RC=1 
    55  echo -e "cd $key\nq\ny\n" | chntpw -e "$hive" | grep -q "not found\!" || RC="0" 
    56  return $RC 
    57 } 
    58  
    59 create_key() { 
    60  local fpath="$1" 
    6165 local tpath="" 
    6266 local bpath="" 
     
    6468 local i="" 
    6569 local OIFS="$IFS" 
    66  IFS="\\" 
    67  for i in $fpath; do 
    68   bpath="$tpath" 
    69   if [ -n "$tpath" ]; then tpath="${tpath}\\${i}"; else tpath="$i"; fi 
    70   if ! test_key "$tpath"; then 
    71    if [ "$bpath" = "" ]; then 
    72     cmd="nk ${i}\nq\ny\n" 
    73    else 
    74     cmd="cd ${bpath}\nnk ${i}\nq\ny\n" 
    75    fi 
    76    exec_command "$cmd" 
    77   fi 
    78  done 
    79  IFS="$OIFS" 
    80 } 
    81  
    82 create_keypath() { 
    83  local key="$1" 
    84  local ctrlset="$2" 
    8570 
    8671 ##### 
     
    9580 [ -n "$DEBUG" ] && echo " 6 fullpath=$fullpath" | tee -a $logfile 
    9681 
    97         # tschmitt: check if currentkey exists in registry, if not create it 
    98         if ! test_key "$fullpath"; then 
    99 #  if [ -n "$ctrlset" ]; then 
    100 #   # don't create new keys in supplemental controlsets 
    101 #   [ -n "$DEBUG" ] && echo "### Skipping $fullpath" | tee -a $logfile 
    102 #   return 1 
    103 #  fi 
    104          [ -n "$DEBUG" ] && echo "### Creating key $fullpath" | tee -a $logfile 
    105          create_key "$fullpath" 
    106         fi 
    107 } 
    108  
    109 # returns success if old value is equal to new value 
    110 test_value(){ 
    111  local fpath="$1" 
    112  local newval="$2" 
    113  local curval="$(echo -e "cat ${fpath}\nq\ny\n" | chntpw -e "$hive" | grep -Fi "$newval")" 
    114  if [ -n "$curval" ]; then 
    115   [ -n "$DEBUG" ] && echo "### $parameter is already set to $curval. Skipping." | tee -a $logfile 
    116   return 0 
    117  else 
    118   [ -n "$DEBUG" ] && echo "### $parameter is not equal to $newval. Patching." | tee -a $logfile 
    119   return 1 
    120  fi 
     82 # iterate over path chunks and create keys if necessary 
     83 IFS="\\" 
     84 for i in $fullpath; do 
     85  # get case sensitive key name from registry 
     86  tpath="$(test_key "$bpath" "$i")" 
     87  # create the key if test_key returns an empty key name 
     88  if [ -z "$tpath" ]; then 
     89   [ -n "$DEBUG" ] && echo "### Creating new key $bpath $i" | tee -a $logfile 
     90   tpath="$i" 
     91   cmd="cd ${bpath}\nnk ${tpath}\nq\ny\n" 
     92   exec_command "$cmd" 
     93  fi 
     94  if [ -n "$bpath" ]; then 
     95   bpath="${bpath}\\${tpath}" 
     96  else 
     97   bpath="$tpath" 
     98  fi 
     99 done 
     100 IFS="$OIFS" 
     101 fullpath="$bpath" 
    121102} 
    122103 
     
    128109 [ "${change// /}" = "" ] && return 1 
    129110 
    130  local command="cd ${fullpath}\n" 
     111 command="cd ${fullpath}\n" 
    131112 [ -n "$DEBUG" ] && echo " 8 command=$command" | tee -a $logfile 
    132113 
     
    159140 fi 
    160141 
    161  # return if value is already set -> nothing to do 
    162 # if [ -n "$value" ]; then 
    163 #  test_value "${fullpath}\\${parameter}" "$value" && return 1 
    164 # fi 
    165  
    166142 local basecommand="${command}" 
    167143 
    168  # delete value 
    169  command="${basecommand}dv ${parameter}\nq\ny\n" 
    170  exec_command "$command" 
    171  [ -n "$DEBUG" ] && echo "16 command=$command" | tee -a $logfile 
    172  
    173  # create value 
    174  command="${basecommand}nv ${type} ${parameter}\nq\ny\n" 
    175  exec_command "$command" 
    176  [ -n "$DEBUG" ] && echo "17 command=$command" | tee -a $logfile 
     144 # get real case sensitive parameter name from registry 
     145 local tpara="" 
     146 tpara="$(test_key "$fullpath" "$parameter")" 
     147 
     148 # create parameter if not found or set parameter name to case sensitive name found in registry 
     149 if [ -z "$tpara" ]; then 
     150  command="${basecommand}nv ${type} ${parameter}\nq\ny\n" 
     151  exec_command "$command" 
     152  [ -n "$DEBUG" ] && echo "16 command=$command" | tee -a $logfile 
     153 else 
     154  parameter="$tpara" 
     155 fi 
    177156 
    178157 # edit value 
    179158 command="${basecommand}ed ${parameter}\n$value\nq\ny\n" 
    180159 exec_command "$command" 
    181  [ -n "$DEBUG" ] && echo "18 command=$command" | tee -a $logfile 
     160 [ -n "$DEBUG" ] && echo "17 command=$command" | tee -a $logfile 
    182161} 
    183162 
     
    218197    create_command || break 
    219198 
    220           # tschmitt: patch other controlsets up to 3 
     199           # tschmitt: patch other controlsets up to 3 
    221200    case "$command" in 
    222201     *ControlSet001*) 
     
    225204                            ctrlset="ControlSet00$n" 
    226205                            [ -n "$DEBUG" ] && echo "### Checking $ctrlset ..." | tee -a $logfile 
    227                             if test_key "$ctrlset"; then 
    228                              key_new="$(echo "$key" | sed "s,ControlSet001,$ctrlset,")" 
     206                            if [ -n "$(test_key "" "$ctrlset")" ]; then 
     207                             key_new="$(echo "$key" | sed "s,ControlSet00[1-9],$ctrlset,")" 
    229208                                    [ -n "$DEBUG" ] && echo "### Patching $ctrlset with new key: $key_new" | tee -a $logfile 
    230                                     create_keypath "$key_new" "$ctrlset" && create_command 
     209                                    create_keypath "$key_new" && create_command 
    231210                            fi 
    232211                            let n+=1 
Note: See TracChangeset for help on using the changeset viewer.