Changeset 528


Ignore:
Timestamp:
09/15/09 13:31:53 (2 years ago)
Author:
tschmitt
Message:
  • Paket:
    • postinst: o syslinux-Dateien werden komplett aus dem vorkompilierten Archiv genommen (kompiliert auf Debian Etch).
  • Kernel: Neue Version 2.6.26.6.
  • Server-Skripte: Neuen syslinux-Version 3.82.
  • Linbofs:
    • Rsync: Neue Version 3.0.6.
    • Grub4dos: Neue Version 0.4.4-06-11.
    • patch_registry.sh aus testing (1.99.6).
Location:
main/linuxmuster-linbo/tags/1.1.18.1
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/linuxmuster-linbo/tags/1.1.18.1/conf/kernel.conf

    r482 r528  
    11# 
    22# Automatically generated make config: don't edit 
    3 # Linux kernel version: 2.6.29.4 
    4 # Wed Jun  3 11:32:53 2009 
     3# Linux kernel version: 2.6.29.6 
     4# Tue Sep 15 10:56:34 2009 
    55# 
    66# CONFIG_64BIT is not set 
  • main/linuxmuster-linbo/tags/1.1.18.1/debian/changelog

    r482 r528  
     1linuxmuster-linbo (1.1.18.1-1) unstable; urgency=low 
     2 
     3  * package: 
     4    - postinst: 
     5      o installs all syslinux related binaries from downloaded archive (compiled on debian etch). 
     6  * kernel: new version 2.6.26.6. 
     7  * server side scripting: syslinux new version 3.82. 
     8  * linbofs: 
     9    - rsync: new version 3.0.6. 
     10    - grub4dos: new version 0.4.4-06-11. 
     11    - patch_registry.sh: merged with the one from development version 1.99.6. 
     12 
     13 -- Thomas Schmitt <schmitt@lmz-bw.de>  Tue, 15 Sep 2009 11:00:17 +0200 
     14 
    115linuxmuster-linbo (1.1.18-1) unstable; urgency=low 
    216 
  • main/linuxmuster-linbo/tags/1.1.18.1/debian/md5sums.src

    r482 r528  
    2209addfe7ae469677da39ed66d83858d3  chntpw-source-080526.zip 
    330b203f03eb15828bf9e017b310c5c0f1  cloop_2.629-1.tar.gz 
    4 285221445566567a89f5c085e984da57  grub4dos-0.4.4-2009-05-17-src.zip 
     482476af067f5325ebb8be30e5350f839  grub4dos-0.4.4-2009-06-11-src.zip 
    557bd0f333fea8124cc83769b3f453efc0  hwinfo_15.3.orig.tar.gz 
    66d9f2ecd3c3307905f24130a25816e6cc  kexec-tools-2.0.0.tar.bz2 
    7 fe2d1ec5bd0f1d9d9e660c812cac7d61  linux-2.6.29.4.tar.bz2 
     77cd24826fd3c7b0f83d9f662731a7865  linux-2.6.29.6.tar.bz2 
    886fad0a69ac89440ad4f696dbbbf11497  ms-sys-2.1.3.tgz 
    99e0b5c170f088a8d82968f0a6b34d31da  ntfs-3g-2009.4.4.tgz 
    10102b39dece8897bc748f4ab4c40ec7699e  ntfsprogs-2.0.0.tar.bz2 
    1111e649dc2587954e1a55c4acf6667a96fc  qt-embedded-free-3.3.7.tar.bz2 
    12 46183b8ba930c846551e04736eec9515  rsync-3.0.6pre1.tar.gz 
     12e9865d093a18e4668b9d31b635dc8e99  rsync-3.0.6.tar.gz 
    1313257ac04e62ab7e3616e220333a1140cb  ssmtp_2.62.orig.tar.gz 
    14 476d5b2f10b3703de7562a3ec118618e  syslinux-3.73.tar.bz2 
     1455e3eb8fd1395d59b6da0b53839c865b  syslinux-3.82.tar.bz2 
  • main/linuxmuster-linbo/tags/1.1.18.1/debian/rules

    r480 r528  
    8787SYSLINUX_ARCHIVE=$(shell grep syslinux- debian/md5sums.src | awk '{ print $$2 }') 
    8888SYSLINUX_DIR=src/$(shell echo $(SYSLINUX_ARCHIVE) | sed -e 's/.tar.bz2//') 
    89 SYSLINUX_URL=http://www.kernel.org/pub/linux/utils/boot/syslinux 
     89#SYSLINUX_URL=http://www.kernel.org/pub/linux/utils/boot/syslinux 
     90SYSLINUX_URL=$(LML_URL) 
    9091 
    9192configure: configure-stamp 
     
    206207                tar xf cache/$(SYSLINUX_ARCHIVE) -C src; \ 
    207208                ln -sf ../$(SYSLINUX_DIR) src/syslinux; \ 
    208                 cp src/syslinux/win32/syslinux.exe src/syslinux; \ 
    209209        fi 
    210210 
     
    306306        fi 
    307307 
    308         # syslinux 
    309         -@if [ ! -e $(SYSLINUX_DIR)/.compiled ]; then \ 
    310                 echo "[1mBuilding syslinux...[0m" ; \ 
    311                 ( cd $(SYSLINUX_DIR) && make clean && cd gpxe/src && make bin/gpxe.lkrn && cd ../../ && make && touch .compiled ); \ 
    312         fi 
     308        # syslinux (already built on etch) 
     309#       -@if [ ! -e $(SYSLINUX_DIR)/gpxe/src/bin/gpxe.lkrn ]; then \ 
     310#               echo "[1mBuilding syslinux...[0m" ; \ 
     311#               ( cd $(SYSLINUX_DIR)/gpxe/src && make bin/gpxe.lkrn ); \ 
     312#       fi 
    313313 
    314314        # qt 
     
    400400        install -m 755 debian/linbo-multicast-server debian/linuxmuster-linbo/usr/sbin/linbo-multicast-server 
    401401        install -m 644 graphics/linbo-pxe-bootscreen.16 debian/linuxmuster-linbo/var/linbo/logo.16 
    402         install -m 644 src/syslinux/core/isolinux.bin debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/isolinux.bin 
    403         install -m 644 src/syslinux/core/pxelinux.0 debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/pxelinux.0 
    404         install -m 644 src/syslinux/com32/menu/vesamenu.c32 debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/vesamenu.c32 
    405         install -m 644 src/syslinux/com32/modules/reboot.c32 debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/reboot.c32 
    406         install -m 644 src/syslinux/syslinux.exe debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/syslinux.exe 
    407         install -m 755 src/syslinux/linux/syslinux debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/syslinux 
    408         install -m 644 src/syslinux/gpxe/src/bin/gpxe.lkrn debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/gpxe.krn 
     402        install -m 644 $(SYSLINUX_DIR)/core/isolinux.bin debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/isolinux.bin 
     403        install -m 644 $(SYSLINUX_DIR)/core/pxelinux.0 debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/pxelinux.0 
     404        install -m 644 $(SYSLINUX_DIR)/com32/menu/vesamenu.c32 debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/vesamenu.c32 
     405        install -m 644 $(SYSLINUX_DIR)/com32/modules/reboot.c32 debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/reboot.c32 
     406        install -m 755 $(SYSLINUX_DIR)/linux/syslinux debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/syslinux 
     407        install -m 644 $(SYSLINUX_DIR)/win32/syslinux.exe debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/syslinux.exe 
     408        install -m 644 $(SYSLINUX_DIR)/gpxe/src/bin/gpxe.lkrn debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/gpxe.krn 
    409409        install -m 644 media/german.kbd debian/linuxmuster-linbo/usr/lib/linuxmuster-linbo/german.kbd 
    410410        install -m 644 media/pxelinux.cfg debian/linuxmuster-linbo/etc/linuxmuster/linbo/pxelinux.cfg.default 
  • main/linuxmuster-linbo/tags/1.1.18.1/linbo/patch_registry.sh

    r482 r528  
    2020# this generates a LOT of debugging messages 
    2121DEBUG="-v" 
    22 file="" 
    23 tmplog="/tmp/output" 
    24 tmpctrls="/tmp/controlsets" 
    25 tmptest="/tmp/keytest" 
     22hive="" 
     23logfile="/tmp/output" 
    2624 
    2725leftchop(){ 
     
    4543} 
    4644 
    47 do_reg() { 
     45exec_command() { 
    4846 local cmd="$1" 
    49  local logfile="$2" 
    50  [ -z "$logfile" ] && logfile="$tmplog" 
    51  chntpw $DEBUG -e "$file" >> $logfile <<. 
     47 chntpw $DEBUG -e "$hive" >> $logfile <<. 
    5248$(echo -e "$cmd") 
    5349. 
     
    5551 
    5652test_key() { 
    57  local path="$1" 
    58  local key="$2" 
    59  local RC=0 
    60  local cmd="ls ${path}\nq\ny\n" 
    61  [ -e "$tmptest" ] && rm $tmptest 
    62  do_reg "$cmd" "$tmptest" 
    63  grep -q "<${key}>" $tmptest || RC=1 
     53 local key="$1" 
     54 local RC=1 
     55 echo -e "cd $key\nq\ny\n" | chntpw -e "$hive" | grep -q "not found\!" || RC="0" 
    6456 return $RC 
    6557} 
    6658 
    6759create_key() { 
    68  local path="$1" 
    69  local key="$2" 
    70  local cmd="cd ${path}\nnk ${key}\nq\ny\n" 
    71  do_reg "$cmd" 
    72 } 
    73  
    74 create_cmd() { 
     60 local fpath="$1" 
     61 local tpath="" 
     62 local bpath="" 
     63 local cmd="" 
     64 local i="" 
     65 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 
     82create_keypath() { 
    7583 local key="$1" 
    7684 local ctrlset="$2" 
     
    8088 ##### 
    8189 
    82  [ -n "$DEBUG" ] && echo "5  key=$key" | tee -a $tmplog 
     90 [ -n "$DEBUG" ] && echo " 5 key=$key" | tee -a $logfile 
    8391 # remove right end and replace it with a backslash 
    8492 key=`rightchopend "$key"` 
    8593 fullpath="$key" 
    86  key="$key\\" 
    87  
    88  [ -n "$DEBUG" ] && echo "6  fullpath=$fullpath" | tee -a $tmplog 
    89  
    90  currentkey=`leftget "$key"` 
    91  [ -n "$DEBUG" ] && echo "7  currentkey=$currentkey" | tee -a $tmplog 
    92  
    93  key=`leftchop "$key"` 
    94  [ -n "$DEBUG" ] && echo "8  key=$key" | tee -a $tmplog 
    95  
    96  base_path="" 
    97  while [ "$currentkey" != "" ]; do 
    98  
    99   [ -z "$base_path" ] && base_path="." 
    100  
    101   [ -n "$DEBUG" ] && echo "9  base_path=$base_path" | tee -a $tmplog 
     94 
     95 [ -n "$DEBUG" ] && echo " 6 fullpath=$fullpath" | tee -a $logfile 
    10296 
    10397        # tschmitt: check if currentkey exists in registry, if not create it 
    104         if ! test_key "$base_path" "$currentkey"; then 
    105    if [ -n "$ctrlset" ]; then 
    106     # don't create new keys in supplemental controlsets 
    107     [ -n "$DEBUG" ] && echo "### Skipping creation of $currentkey in $ctrlset!" | tee -a $tmplog 
    108     return 1 
    109    fi 
    110          [ -n "$DEBUG" ] && echo "### Creating key $currentkey" | tee -a $tmplog 
    111          create_key "$base_path" "$currentkey" 
     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" 
    112106        fi 
    113  
    114         if [ "$base_path" = "." ]; then 
    115          base_path="${currentkey}" 
    116         else 
    117          base_path="${base_path}\\${currentkey}" 
    118         fi 
    119  
    120   currentkey=`leftget "$key"` 
    121   [ -n "$DEBUG" ] && echo "10 currentkey=$currentkey" | tee -a $tmplog 
    122  
    123   key=`leftchop "$key"` 
    124   [ -n "$DEBUG" ] && echo "11 key=$key" | tee -a $tmplog 
    125  
    126  done 
    127  
    128  base_command="cd ${fullpath}\n" 
    129 } 
    130  
    131 create_val() { 
     107} 
     108 
     109# returns success if old value is equal to new value 
     110test_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 
     121} 
     122 
     123create_command() { 
    132124 #### 
    133125 # parse value changes 
    134126 #### 
    135  [ -n "$DEBUG" ] && echo "12 change=$change" | tee -a $tmplog 
    136  
    137  if [ "$change" = "" ]; then  
    138   return 1 
    139  fi 
    140  
    141  command="${base_command}" 
    142  [ -n "$DEBUG" ] && echo "13 command=$command" | tee -a $tmplog 
    143  
    144  parameter=`leftgetvalue "$change"` 
    145  [ -n "$DEBUG" ] && echo "14 parameter=$parameter" | tee -a $tmplog 
     127 [ -n "$DEBUG" ] && echo " 7 change=$change" | tee -a $logfile 
     128 [ "${change// /}" = "" ] && return 1 
     129 
     130 local command="cd ${fullpath}\n" 
     131 [ -n "$DEBUG" ] && echo " 8 command=$command" | tee -a $logfile 
     132 
     133 local parameter=`leftgetvalue "$change"` 
     134 [ -n "$DEBUG" ] && echo " 9 parameter=$parameter" | tee -a $logfile 
    146135 
    147136 parameter="$(echo "$parameter" | sed 's,\",,g')" 
    148  [ -n "$DEBUG" ] && echo "15 parameter=$parameter" | tee -a $tmplog 
    149  
    150  value=`rightgetvalue "$change"` 
    151  [ -n "$DEBUG" ] && echo "16 value=$value" | tee -a $tmplog 
     137 [ -n "$DEBUG" ] && echo "10 parameter=$parameter" | tee -a $logfile 
     138 
     139 local value=`rightgetvalue "$change"` 
     140 [ -n "$DEBUG" ] && echo "11 value=$value" | tee -a $logfile 
    152141 
    153142 value="$(echo "$value" | sed 's,\",,g')" 
    154  [ -n "$DEBUG" ] && echo "17 value=$value" | tee -a $tmplog 
    155            
     143 [ -n "$DEBUG" ] && echo "12 value=$value" | tee -a $logfile 
     144 
    156145 value="$(echo "$value" | sed 's,$,,g')" 
    157  [ -n "$DEBUG" ] && echo "18 value=$value" | tee -a $tmplog 
     146 [ -n "$DEBUG" ] && echo "13 value=$value" | tee -a $logfile 
    158147 
    159148 # our standard type for strings is REG_SZ 
    160  type="1" 
     149 local type="1" 
    161150 case "$value" in 
    162151  dword*) value="$(echo "$value" | sed 's,^dword:,0x,g')" 
     
    166155 esac 
    167156 if [ -n "$DEBUG" ]; then 
    168   echo "19 type=$type" | tee -a $tmplog 
    169   echo "20 value=$value" | tee -a $tmplog 
     157  echo "14 type=$type" | tee -a $logfile 
     158  echo "15 value=$value" | tee -a $logfile 
    170159 fi 
    171160 
    172  command="${command}dv ${parameter}\n" 
    173  command="${command}nv ${type} ${parameter}\n" 
    174  [ -n "$DEBUG" ] && echo "21 command=$command" | tee -a $tmplog 
    175  
    176  command="${command}ed ${parameter}\n" 
    177  [ -n "$DEBUG" ] && echo "22 command=$command" | tee -a $tmplog 
    178  
    179  command="${command}$value\nq\ny\n" 
    180  [ -n "$DEBUG" ] && echo "23 command=$command" | tee -a $tmplog 
    181  
    182  # out final command 
    183  [ -n "$DEBUG" ] && echo "24 final command=$command" | tee -a $tmplog 
     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 
     166 local basecommand="${command}" 
     167 
     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 
     177 
     178 # edit value 
     179 command="${basecommand}ed ${parameter}\n$value\nq\ny\n" 
     180 exec_command "$command" 
     181 [ -n "$DEBUG" ] && echo "18 command=$command" | tee -a $logfile 
    184182} 
    185183 
    186184while read -r key; do 
    187   [ -n "$DEBUG" ] && echo "$key $((count++))" | tee -a $tmplog 
    188  
    189   # select file for patching 
    190   case "$key" in  
    191     \[HKEY_LOCAL_MACHINE*)  
    192       key="$(leftchop "$key")" 
    193       [ -n "$DEBUG" ] && echo "1  key=$key" | tee -a $tmplog 
    194  
    195       case `leftget "$key"` in 
    196         [Ss][Yy][Ss][Tt][Ee][Mm]*)  
    197           file="$(ls -1d $2/[Ww][Ii][Nn][Dd][Oo][Ww][Ss]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Yy][Ss][Tt][Ee][Mm] 2>/dev/null | tail -1)" 
    198           [ -z "$file" ] && file="$(ls -1d $2/[Ww][Ii][Nn][Nn][Tt]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Yy][Ss][Tt][Ee][Mm] 2>/dev/null | tail -1)" 
    199           # strip file 
    200           key=`leftchop "$key"` 
    201           [ -n "$DEBUG" ] && echo "2  key=$key" | tee -a $tmplog 
    202  
    203           # change "CurrentControlSet" to "ControlSet001" 
    204           key="$(echo "$key" | sed 's,CurrentControlSet,ControlSet001,')" 
    205           [ -n "$DEBUG" ] && echo "3  key=$key" | tee -a $tmplog 
    206           ;; 
    207         [Ss][Oo][Ff][Tt][Ww][Aa][Rr][Ee]*)  
    208             file="$(ls -1d $2/[Ww][Ii][Nn][Dd][Oo][Ww][Ss]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Oo][Ff][Tt][Ww][Aa][Rr][Ee] 2>/dev/null | tail -1)" 
    209             [ -z "$file" ] && file="$(ls -1d $2/[Ww][Ii][Nn][Nn][Tt]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Oo][Ff][Tt][Ww][Aa][Rr][Ee] 2>/dev/null | tail -1)" 
    210           # strip file 
    211           key=`leftchop "$key"` 
    212           [ -n "$DEBUG" ] && echo "4  key=$key" | tee -a $tmplog 
    213           ;; 
    214       esac 
    215  
    216                         create_cmd "$key" 
    217  
    218       while read -r change; do 
    219  
    220         create_val || break 
    221  
    222         do_reg "$command" 
    223  
    224                                 # tschmitt: patch other controlsets up to 9 
    225         case "$command" in 
    226           *ControlSet001*) 
    227                                                 if [ ! -s "$tmpctrls" ]; then 
    228                                                         [ -n "$DEBUG" ] && echo "### Writing $tmpctrls ..." | tee -a $tmplog 
    229                                                         controlcheck="ls\nq\ny\n" 
    230                                                         do_reg "$controlcheck" "$tmpctrls" 
    231                                                 fi 
    232                                                 n=2 
    233                                                 while [ $n -lt 10 ]; do 
    234                                                         ctrlset="ControlSet00$n" 
    235                                                         [ -n "$DEBUG" ] && echo "### Checking $ctrlset ..." | tee -a $tmplog 
    236                                                         if grep -q "<$ctrlset>" $tmpctrls; then 
    237                                                                 key_new="$(echo "$key" | sed "s,ControlSet001,$ctrlset,")" 
    238                                                                 [ -n "$DEBUG" ] && echo "### Patching $ctrlset with new key: $key_new" | tee -a $tmplog 
    239                                                                 if create_cmd "$key_new" "$ctrlset"; then 
    240                                                                         create_val 
    241                                                                         do_reg "$command" 
    242                                                                 fi 
    243                                                         fi 
    244                                                         let n+=1 
    245                                                 done 
    246                                                 ;; 
    247         esac 
    248  
    249       done # while read -r change  
    250       ;; 
    251   esac # case "$key" 
     185 [ -n "$DEBUG" ] && echo "$key $((count++))" | tee -a $logfile 
     186 
     187 # select hive for patching 
     188 case "$key" in  
     189  \[HKEY_LOCAL_MACHINE*)  
     190   key="$(leftchop "$key")" 
     191   [ -n "$DEBUG" ] && echo " 1 key=$key" | tee -a $logfile 
     192 
     193   case `leftget "$key"` in 
     194    [Ss][Yy][Ss][Tt][Ee][Mm]*)  
     195     hive="$(ls -1d $2/[Ww][Ii][Nn][Dd][Oo][Ww][Ss]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Yy][Ss][Tt][Ee][Mm] 2>/dev/null | tail -1)" 
     196     [ -z "$hive" ] && hive="$(ls -1d $2/[Ww][Ii][Nn][Nn][Tt]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Yy][Ss][Tt][Ee][Mm] 2>/dev/null | tail -1)" 
     197     # strip hive 
     198     key=`leftchop "$key"` 
     199     [ -n "$DEBUG" ] && echo " 2 key=$key" | tee -a $logfile 
     200 
     201     # change "CurrentControlSet" to "ControlSet001" 
     202     key="$(echo "$key" | sed 's,CurrentControlSet,ControlSet001,')" 
     203     [ -n "$DEBUG" ] && echo " 3 key=$key" | tee -a $logfile 
     204     ;; 
     205    [Ss][Oo][Ff][Tt][Ww][Aa][Rr][Ee]*)  
     206     hive="$(ls -1d $2/[Ww][Ii][Nn][Dd][Oo][Ww][Ss]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Oo][Ff][Tt][Ww][Aa][Rr][Ee] 2>/dev/null | tail -1)" 
     207     [ -z "$hive" ] && hive="$(ls -1d $2/[Ww][Ii][Nn][Nn][Tt]/[Ss][Yy][Ss][Tt][Ee][Mm]32/[Cc][Oo][Nn][Ff][Ii][Gg]/[Ss][Oo][Ff][Tt][Ww][Aa][Rr][Ee] 2>/dev/null | tail -1)" 
     208     # strip hive 
     209     key=`leftchop "$key"` 
     210     [ -n "$DEBUG" ] && echo " 4 key=$key" | tee -a $logfile 
     211     ;; 
     212   esac 
     213 
     214   create_keypath "$key" 
     215 
     216   while read -r change; do 
     217 
     218    create_command || break 
     219 
     220          # tschmitt: patch other controlsets up to 3 
     221    case "$command" in 
     222     *ControlSet001*) 
     223                    n=2 
     224                    while [ $n -lt 4 ]; do 
     225                            ctrlset="ControlSet00$n" 
     226                            [ -n "$DEBUG" ] && echo "### Checking $ctrlset ..." | tee -a $logfile 
     227                            if test_key "$ctrlset"; then 
     228                             key_new="$(echo "$key" | sed "s,ControlSet001,$ctrlset,")" 
     229                                    [ -n "$DEBUG" ] && echo "### Patching $ctrlset with new key: $key_new" | tee -a $logfile 
     230                                    create_keypath "$key_new" "$ctrlset" && create_command 
     231                            fi 
     232                            let n+=1 
     233                    done 
     234                    ;; 
     235    esac 
     236 
     237   done # while read -r change  
     238   ;; 
     239 esac # case "$key" 
    252240 
    253241done < "$1" # while read -r key 
    254242 
    255 # merge logfiles 
    256 cat $tmplog >> $tmpctrls 
    257 mv $tmpctrls $tmplog 
    258  
Note: See TracChangeset for help on using the changeset viewer.