Indexed arrays were only needed to override defaults.
This commit is contained in:
parent
ec2ff428f8
commit
2b32655365
25
rc.conf
25
rc.conf
|
@ -14,25 +14,24 @@ cfg_services+=(
|
||||||
'@lo.iface' '@scron'
|
'@lo.iface' '@scron'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add modules you want to be loaded at boot time here
|
# Uncomment and add modules you want to be loaded at boot time here
|
||||||
#cfg_modules=( )
|
#cfg_modules=( )
|
||||||
|
|
||||||
# Make C-A-D perform a soft reset
|
# Make C-A-D perform a soft reset
|
||||||
ctrlaltdel soft
|
ctrlaltdel soft
|
||||||
|
|
||||||
# Default virtual mounts for linux systems
|
# Virtual filesystems
|
||||||
cfg_mounts[proc]='proc:/proc'
|
cfg_mounts=(
|
||||||
cfg_mounts[run]='tmpfs:/run'
|
'proc:proc:/proc'
|
||||||
cfg_mounts[sys]='sysfs:/sys'
|
'run:tmpfs:/run'
|
||||||
|
'sys:sysfs:/sys'
|
||||||
|
|
||||||
# devfs and its children
|
'dev:devtmpfs:/dev'
|
||||||
cfg_mounts[dev]='devtmpfs:/dev'
|
'pts:devpts:/dev/pts:noexec,nosuid,gid=5,mode=0620'
|
||||||
cfg_mounts[pts]='devpts:/dev/pts:noexec,nosuid,gid=5,mode=0620'
|
'mqueue:mqueue:/dev/mqueue:noexec,nosuid,nodev'
|
||||||
cfg_mounts[mqueue]='mqueue:/dev/mqueue:noexec,nosuid,nodev'
|
'shm:tmpfs:/dev/shm:defaults,mode=0777'
|
||||||
cfg_mounts[shm]='tmpfs:/dev/shm:defaults,mode=0777'
|
)
|
||||||
|
|
||||||
# Some temporary directories
|
# Some temporary directories and files
|
||||||
cfg_tmpdirs+=( '/run/lock' '/run/lock/lvm' '/run/lvm' '/run/user' )
|
cfg_tmpdirs+=( '/run/lock' '/run/lock/lvm' '/run/lvm' '/run/user' )
|
||||||
|
|
||||||
# And temporary files
|
|
||||||
cfg_tmpfiles+=( '/run/utmp' )
|
cfg_tmpfiles+=( '/run/utmp' )
|
||||||
|
|
12
rc.in
12
rc.in
|
@ -26,17 +26,17 @@ rc.tmpfiles() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.mount_misc() {
|
rc.mount() {
|
||||||
for fs in "${!cfg_mounts[@]}"; do
|
for fs in "${cfg_mounts[@]}"; do
|
||||||
echo "${cfg_mounts[$fs]}" | while IFS=':' read fs_type mountpoint mount_options; do
|
echo "$fs" | while IFS=':' read device fs_type mountpoint mount_options
|
||||||
|
|
||||||
[[ "$mount_options" ]] || { mount_options='defaults'; }
|
[[ "$mount_options" ]] || { mount_options='defaults'; }
|
||||||
|
|
||||||
mountpoint -q "$mountpoint" || {
|
mountpoint -q "$mountpoint" || {
|
||||||
[[ -d "$mountpoint" ]] || { mkdir -p "$mountpoint"; }
|
[[ -d "$mountpoint" ]] || { mkdir -p "$mountpoint"; }
|
||||||
mount "$fs" -n -t "$fs_type" -o "$mount_options" "$mountpoint"
|
mount "$device" -n -t "$fs_type" -o "$mount_options" "$mountpoint"
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.parse_cmdline() {
|
rc.parse_cmdline() {
|
||||||
|
@ -108,7 +108,7 @@ rc.remount_root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.boot() {
|
rc.boot() {
|
||||||
rc.mount_misc
|
rc.mount
|
||||||
rc.tmpfiles
|
rc.tmpfiles
|
||||||
rc.hostname
|
rc.hostname
|
||||||
rc.timezone
|
rc.timezone
|
||||||
|
|
Loading…
Reference in New Issue
Block a user