]> wimlib.net Git - wimlib/blobdiff - programs/mkwinpeimg.in
v1.14.4
[wimlib] / programs / mkwinpeimg.in
index 42b477971279b7a040e7d761214a716e0cd5203f..8e9cfeb0b141069b16918ef18823fa3a7dc2a0f5 100755 (executable)
@@ -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 <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 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