From 9729a1006f3e64947cd4cff1428cc6d1426c4a20 Mon Sep 17 00:00:00 2001 From: amy Date: Wed, 26 Jan 2022 19:15:00 +0100 Subject: [PATCH] fix genfstab issue ( #3 ) --- PKGBUILD | 0 src/functions/base.rs | 8 +++----- src/internal/install.rs | 5 +---- 3 files changed, 4 insertions(+), 9 deletions(-) mode change 100644 => 100755 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD old mode 100644 new mode 100755 diff --git a/src/functions/base.rs b/src/functions/base.rs index 29d735c..def7676 100755 --- a/src/functions/base.rs +++ b/src/functions/base.rs @@ -28,12 +28,10 @@ pub fn install_base_packages() { pub fn genfstab() { exec_eval( exec( - "genfstab", + "bash", vec![ - String::from("-U"), - String::from("/mnt"), - String::from(">>"), - String::from("/mnt/etc/fstab"), + String::from("-c"), + String::from("genfstab -U /mnt >> /mnt/etc/fstab"), ], ), "Generate fstab", diff --git a/src/internal/install.rs b/src/internal/install.rs index 2eaca16..b15d13a 100755 --- a/src/internal/install.rs +++ b/src/internal/install.rs @@ -3,10 +3,7 @@ use std::process::Command; pub fn install(pkgs: Vec<&str>) { exec_eval( - Command::new("pacstrap") - .arg("/mnt") - .args(&pkgs) - .status(), + Command::new("pacstrap").arg("/mnt").args(&pkgs).status(), format!("Install packages {}", pkgs.join(", ")).as_str(), ); }