Create /var/lib/AccountsService before writing into file

axtloss/rework-partitioning
axtloss 2 years ago committed by Michal S
parent df3ba5005e
commit 3d60a7ab31

@ -66,6 +66,7 @@ pub fn new_user(username: &str, hasroot: bool, password: &str, do_hash_pass: boo
files::append_file("/mnt/etc/sudoers", "\nDefaults pwfeedback\n"),
"Add pwfeedback to sudoers",
);
files::create_directory("/mnt/var/lib/AccountsService");
files::create_file(&format!("/mnt/var/lib/AccountsService/users/{}", username));
files_eval(
files::append_file(

@ -46,5 +46,5 @@ pub fn sed_file(path: &str, find: &str, replace: &str) -> std::io::Result<()> {
}
pub fn create_directory(path: &str) -> std::io::Result<()> {
std::fs::create_dir(path)
std::fs::create_dir_all(path)
}

Loading…
Cancel
Save