mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-08-27 20:36:32 -04:00
Fix running commands on booted systems; fix firmware installation
This commit is contained in:
+1
-1
@@ -21,8 +21,8 @@ func firmwareSelector() {
|
||||
return
|
||||
case 2:
|
||||
allPackages := append(nonOptional, optional...)
|
||||
managePackages("-S", allPackages)
|
||||
managePackages("-Rcns", []string{"linux-firmware"})
|
||||
managePackages("-S", allPackages)
|
||||
case 3:
|
||||
optional = append(optional, firm+"intel")
|
||||
case 4:
|
||||
|
||||
+11
-3
@@ -75,11 +75,19 @@ func mountPartition() {
|
||||
}
|
||||
|
||||
func chrootCommandRun(args []string) {
|
||||
args = append([]string{mountPoint}, args...)
|
||||
cmd := exec.Command("arch-chroot", args...)
|
||||
var cmd *exec.Cmd
|
||||
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()
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user