parse fstab

This commit is contained in:
illiliti 2020-02-19 19:25:45 +03:00
parent cb3ada7257
commit fc47af17b3
2 changed files with 16 additions and 6 deletions

View File

@ -85,10 +85,20 @@ create_symlinks() {
} ) } )
} }
#parse_fstab() { parse_fstab() {
# TODO parse fstab msg info "parsing fstab"
#while [ "$fstab" -eq 1 ] && read fs dir type opts; do thing; done < /etc/fstab
#} while read -r fs dir type opts dump pass; do
# ignore comments
if [ ! "${fs##"#"*}" ]; then
continue
elif [ "$dir" = / ]; then
root="${root:-$fs}"
root_type="${root_type:-$type}"
root_args="${root_args:-$opts}"
fi
done < /etc/fstab
}
#parse_crypttab() { #parse_crypttab() {
# TODO parse crypttab # TODO parse crypttab
@ -355,7 +365,7 @@ moddir="/lib/modules"
create_structure create_structure
create_symlinks create_symlinks
#parse_fstab [ "$fstab" = 1 ] && parse_fstab
#parse_crypttab #parse_crypttab
install_requirements install_requirements

2
init
View File

@ -85,7 +85,7 @@ trigger_lvm() {
} }
mnt_rootfs() { mnt_rootfs() {
mount ${root_type:+-t $root_type} $root_args $(findfs_sh "$root") /mnt/root || panic "failed to mount rootfs" mount ${root_type:+-t $root_type} ${root_args:+-o $root_args} $(findfs_sh "$root") /mnt/root || panic "failed to mount rootfs"
} }
cleanup() { cleanup() {