Indexed arrays were only needed to override defaults.
This commit is contained in:
20
rc.in
20
rc.in
@@ -26,16 +26,16 @@ rc.tmpfiles() {
|
||||
done
|
||||
}
|
||||
|
||||
rc.mount_misc() {
|
||||
for fs in "${!cfg_mounts[@]}"; do
|
||||
echo "${cfg_mounts[$fs]}" | while IFS=':' read fs_type mountpoint mount_options; do
|
||||
[[ "$mount_options" ]] || { mount_options='defaults'; }
|
||||
rc.mount() {
|
||||
for fs in "${cfg_mounts[@]}"; do
|
||||
echo "$fs" | while IFS=':' read device fs_type mountpoint mount_options
|
||||
|
||||
mountpoint -q "$mountpoint" || {
|
||||
[[ -d "$mountpoint" ]] || { mkdir -p "$mountpoint"; }
|
||||
mount "$fs" -n -t "$fs_type" -o "$mount_options" "$mountpoint"
|
||||
}
|
||||
done
|
||||
[[ "$mount_options" ]] || { mount_options='defaults'; }
|
||||
|
||||
mountpoint -q "$mountpoint" || {
|
||||
[[ -d "$mountpoint" ]] || { mkdir -p "$mountpoint"; }
|
||||
mount "$device" -n -t "$fs_type" -o "$mount_options" "$mountpoint"
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ rc.remount_root() {
|
||||
}
|
||||
|
||||
rc.boot() {
|
||||
rc.mount_misc
|
||||
rc.mount
|
||||
rc.tmpfiles
|
||||
rc.hostname
|
||||
rc.timezone
|
||||
|
Reference in New Issue
Block a user