Changeset 555
- Timestamp:
- 10/23/09 20:47:05 (2 years ago)
- Location:
- main/linuxmuster-linbo/branches/testing
- Files:
-
- 1 added
- 4 edited
-
debian/changelog (modified) (1 diff)
-
debian/links (modified) (1 diff)
-
examples/win7.reg (added)
-
linbo/linbo_cmd.sh (modified) (1 diff)
-
linbo/patch_registry.sh (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
main/linuxmuster-linbo/branches/testing/debian/changelog
r536 r555 1 linuxmuster-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 1 15 linuxmuster-linbo (1.99.10-0) unstable; urgency=low 2 16 -
main/linuxmuster-linbo/branches/testing/debian/links
r530 r555 4 4 usr/lib/linuxmuster-linbo/gpxe.krn var/linbo/gpxe.krn 5 5 usr/share/doc/linuxmuster-linbo/examples var/linbo/examples 6 usr/share/linuxmuster-linbo/repack-cloop.sh usr/sbin/repack-cloop7 6 usr/share/linuxmuster-linbo/update-linbofs.sh usr/sbin/update-linbofs 8 7 usr/share/linuxmuster-linbo/make-linbo-media.sh usr/sbin/make-linbo-media -
main/linuxmuster-linbo/branches/testing/linbo/linbo_cmd.sh
r536 r555 575 575 esac 576 576 # 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 578 581 mkgrldr "$1" "/ntldr" 579 elif [ -e /mnt/[Bb][Oo][Oo][Tt][Mm][Gg][Rr] ]; then580 mkgrldr "$1" "/bootmgr"581 582 elif [ -e /mnt/[Ii][Oo].[Ss][Yy][Ss] ]; then 582 583 # tschmitt: patch autoexec.bat (win98), -
main/linuxmuster-linbo/branches/testing/linbo/patch_registry.sh
r518 r555 7 7 # 8 8 # Thomas Schmitt <schmitt@lmz-bw.de> 9 # 2 0.04.20099 # 23.10.2009 10 10 # 11 11 … … 50 50 } 51 51 52 # test_key basepath key (returns case sensitive key name or nothing) 52 53 test_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 63 create_keypath() { 53 64 local key="$1" 54 local RC=155 echo -e "cd $key\nq\ny\n" | chntpw -e "$hive" | grep -q "not found\!" || RC="0"56 return $RC57 }58 59 create_key() {60 local fpath="$1"61 65 local tpath="" 62 66 local bpath="" … … 64 68 local i="" 65 69 local OIFS="$IFS" 66 IFS="\\"67 for i in $fpath; do68 bpath="$tpath"69 if [ -n "$tpath" ]; then tpath="${tpath}\\${i}"; else tpath="$i"; fi70 if ! test_key "$tpath"; then71 if [ "$bpath" = "" ]; then72 cmd="nk ${i}\nq\ny\n"73 else74 cmd="cd ${bpath}\nnk ${i}\nq\ny\n"75 fi76 exec_command "$cmd"77 fi78 done79 IFS="$OIFS"80 }81 82 create_keypath() {83 local key="$1"84 local ctrlset="$2"85 70 86 71 ##### … … 95 80 [ -n "$DEBUG" ] && echo " 6 fullpath=$fullpath" | tee -a $logfile 96 81 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" 121 102 } 122 103 … … 128 109 [ "${change// /}" = "" ] && return 1 129 110 130 localcommand="cd ${fullpath}\n"111 command="cd ${fullpath}\n" 131 112 [ -n "$DEBUG" ] && echo " 8 command=$command" | tee -a $logfile 132 113 … … 159 140 fi 160 141 161 # return if value is already set -> nothing to do162 # if [ -n "$value" ]; then163 # test_value "${fullpath}\\${parameter}" "$value" && return 1164 # fi165 166 142 local basecommand="${command}" 167 143 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 177 156 178 157 # edit value 179 158 command="${basecommand}ed ${parameter}\n$value\nq\ny\n" 180 159 exec_command "$command" 181 [ -n "$DEBUG" ] && echo "1 8command=$command" | tee -a $logfile160 [ -n "$DEBUG" ] && echo "17 command=$command" | tee -a $logfile 182 161 } 183 162 … … 218 197 create_command || break 219 198 220 # tschmitt: patch other controlsets up to 3199 # tschmitt: patch other controlsets up to 3 221 200 case "$command" in 222 201 *ControlSet001*) … … 225 204 ctrlset="ControlSet00$n" 226 205 [ -n "$DEBUG" ] && echo "### Checking $ctrlset ..." | tee -a $logfile 227 if test_key "$ctrlset"; then228 key_new="$(echo "$key" | sed "s,ControlSet00 1,$ctrlset,")"206 if [ -n "$(test_key "" "$ctrlset")" ]; then 207 key_new="$(echo "$key" | sed "s,ControlSet00[1-9],$ctrlset,")" 229 208 [ -n "$DEBUG" ] && echo "### Patching $ctrlset with new key: $key_new" | tee -a $logfile 230 create_keypath "$key_new" "$ctrlset"&& create_command209 create_keypath "$key_new" && create_command 231 210 fi 232 211 let n+=1
Note: See TracChangeset
for help on using the changeset viewer.
