Browse Source

dracut: Fix autoinstaller

Michael Aldridge 4 năm trước cách đây
mục cha
commit
4332c72896
3 tập tin đã thay đổi với 9 bổ sung10 xóa
  1. 5 5
      dracut/autoinstaller/install.sh
  2. 3 4
      dracut/autoinstaller/module-setup.sh
  3. 1 1
      mklive.sh.in

+ 5 - 5
dracut/autoinstaller/install.sh

@@ -22,12 +22,12 @@ VAI_welcome() {
 }
 
 VAI_get_address() {
-    # Enable the hook for resolv.conf
-    mkdir -p /usr/lib/dhcpcd/dhcpcd-hooks
-    ln -sf /usr/libexec/dhcpcd-hooks/20-resolv.conf /usr/lib/dhcpcd/dhcpcd-hooks/
+    mkdir -p /var/lib/dhclient
 
-    # Get an IP address
-    dhcpcd -w -L --timeout 0
+    # This will fork, but it means that over a slow link the DHCP
+    # lease will still be maintained.  It also doesn't have a
+    # hard-coded privsep user in it like dhcpcd.
+    dhclient
 }
 
 VAI_partition_disk() {

+ 3 - 4
dracut/autoinstaller/module-setup.sh

@@ -17,7 +17,8 @@ install() {
     inst /usr/bin/clear
     inst /usr/bin/cp
     inst /usr/bin/chpasswd
-    inst /usr/bin/dhcpcd
+    inst /usr/bin/dhclient
+    inst /usr/bin/dhclient-script
     inst /usr/bin/halt
     inst /usr/bin/install
     inst /usr/bin/lsblk
@@ -25,15 +26,13 @@ install() {
     inst /usr/bin/mkfs.ext4
     inst /usr/bin/mkswap
     inst /usr/bin/mount
+    inst /usr/bin/resolvconf
     inst /usr/bin/sfdisk
     inst /usr/bin/sync
     inst /usr/bin/xbps-install
     inst /usr/bin/xbps-uhelper
     inst /usr/bin/xbps-query
 
-    inst /usr/libexec/dhcpcd-hooks/20-resolv.conf
-    inst /usr/libexec/dhcpcd-run-hooks
-
     inst_multiple /var/db/xbps/keys/*
     inst_multiple /usr/share/xbps.d/*
 

+ 1 - 1
mklive.sh.in

@@ -30,7 +30,7 @@ trap 'error_out $? $LINENO' INT TERM 0
 umask 022
 
 readonly REQUIRED_PKGS="base-files libgcc dash coreutils sed tar gawk syslinux grub-i386-efi grub-x86_64-efi squashfs-tools xorriso"
-readonly INITRAMFS_PKGS="binutils xz device-mapper dhclient dracut-network"
+readonly INITRAMFS_PKGS="binutils xz device-mapper dhclient dracut-network openresolv"
 readonly PROGNAME=$(basename "$0")
 
 info_msg() {