Fix running commands on booted systems; fix firmware installation

This commit is contained in:
2025-10-12 16:37:34 -04:00
parent f8cec72325
commit c62731ced3
2 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -21,8 +21,8 @@ func firmwareSelector() {
return return
case 2: case 2:
allPackages := append(nonOptional, optional...) allPackages := append(nonOptional, optional...)
managePackages("-S", allPackages)
managePackages("-Rcns", []string{"linux-firmware"}) managePackages("-Rcns", []string{"linux-firmware"})
managePackages("-S", allPackages)
case 3: case 3:
optional = append(optional, firm+"intel") optional = append(optional, firm+"intel")
case 4: case 4:
+11 -3
View File
@@ -75,11 +75,19 @@ func mountPartition() {
} }
func chrootCommandRun(args []string) { func chrootCommandRun(args []string) {
args = append([]string{mountPoint}, args...) var cmd *exec.Cmd
cmd := exec.Command("arch-chroot", args...) var errorSlice int
if partitionR == "/" {
errorSlice = 0
cmd = exec.Command(args[0], args[1:]...)
} else {
errorSlice = 1
args = append([]string{mountPoint}, args...)
cmd = exec.Command("arch-chroot", args...)
}
err := cmd.Run() err := cmd.Run()
if err != nil { if err != nil {
other.PrintError("Failed to run \""+strings.Join(args[1:], " ")+"\" within chroot: "+err.Error(), 1) other.PrintError("Failed to run \""+strings.Join(args[errorSlice:], " ")+"\" within chroot: "+err.Error(), 1)
} }
} }