X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=programs%2Fmkwinpeimg.in;h=85dadc77b5f1c3f2ddaabcf9b09048947d9cbef8;hp=42b477971279b7a040e7d761214a716e0cd5203f;hb=HEAD;hpb=a5edc75084110cd30d21d41c98d281cd4749d5cf diff --git a/programs/mkwinpeimg.in b/programs/mkwinpeimg.in index 42b47797..8e9cfeb0 100755 --- a/programs/mkwinpeimg.in +++ b/programs/mkwinpeimg.in @@ -16,7 +16,7 @@ # 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 . +# along with this program. If not, see . script_name="$(basename "$0")" PREFIX_REG="::" @@ -485,13 +485,16 @@ make_disk_img() { 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