# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
script_name="$(basename "$0")"
PREFIX_REG="::"
exec 3>&-
stat_busy "Rebuilding WIM with changes made"
- wimlib-imagex update "$boot_wim" --rebuild \
+ # Use case-insensitive mode; some Windows PE images contain a "windows"
+ # directory instead of a "Windows" directory...
+ WIMLIB_IMAGEX_IGNORE_CASE=1 wimlib-imagex update "$boot_wim" --rebuild \
< "$tmp_dir/__mkwinpeimg.update.cmds" > /dev/null || stat_fail
stat_done
}
syslinux --install "$image"
- syslinuxdir="/usr/lib/syslinux"
-
- if [ -d "$syslinuxdir/bios" ]; then
- biosdir="$syslinuxdir/bios"
- else
- biosdir="$syslinuxdir"
- fi
+ for biosdir in \
+ /usr/lib/syslinux/modules/bios \
+ /usr/lib/syslinux/bios \
+ /usr/lib/syslinux \
+ /usr/share/syslinux
+ do
+ if [ -e "$biosdir/chain.c32" ]; then
+ break
+ fi
+ done
mcopy "$biosdir/chain.c32" s: || stat_fail
if [ -e "$biosdir/libcom32.c32" ]; then