Browse Source

installer: make remote install work with musl live images.

Juan RP 10 years ago
parent
commit
9b4819f33a
1 changed files with 9 additions and 1 deletions
  1. 9 1
      installer.sh.in

+ 9 - 1
installer.sh.in

@@ -794,12 +794,20 @@ install_packages() {
     cp -a /usr/share/xbps.d $TARGETDIR/usr/share/
     cp /var/db/xbps/keys/*.plist $TARGETDIR/var/db/xbps/keys
     mkdir -p $TARGETDIR/boot/grub
-    stdbuf -oL xbps-install  -r $TARGETDIR -Sy ${_syspkg} ${_grub} 2>&1 | \
+
+    _arch=$(xbps-uhelper arch)
+
+    stdbuf -oL env XBPS_ARCH=${_arch} \
+        xbps-install  -r $TARGETDIR -Sy ${_syspkg} ${_grub} 2>&1 | \
         DIALOG --title "Installing base system packages..." \
         --programbox 24 80
     if [ $? -ne 0 ]; then
         DIE 1
     fi
+    # If uname -m != _arch perform a reconfiguration.
+    if [ "$(uname -m)" != "${_arch}" ]; then
+        XBPS_ARCH=${_arch} xbps-reconfigure -r $TARGETDIR -a
+    fi
 }
 
 enable_dhcpd() {