Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
0afbcc55f2 | |||
1d5e825201 | |||
15592c0daa | |||
e379e8efff | |||
9363ea33f5 | |||
92b8205255 | |||
5dad6a777e |
11
rc.conf
11
rc.conf
@@ -1,6 +1,9 @@
|
||||
# System-wide configuration
|
||||
# A default PATH
|
||||
export PATH='/usr/local/bin:/usr/local/sbin:/usr/bin'
|
||||
|
||||
# Locale
|
||||
export LC_ALL='en_US.UTF-8'
|
||||
|
||||
# Hostname
|
||||
cfg_hostname='spark'
|
||||
|
||||
@@ -11,7 +14,7 @@ cfg_hostname='spark'
|
||||
# Services that start with @ are executed in parallel
|
||||
cfg_services+=(
|
||||
'fsck' 'mount' 'sysctl' 'rsyslogd'
|
||||
'@lo.iface' '@scron'
|
||||
'@lo.iface' '@scron' @agetty-tty{2..6}
|
||||
)
|
||||
|
||||
# Uncomment and add modules you want to be loaded at boot time here
|
||||
@@ -22,8 +25,10 @@ ctrlaltdel soft
|
||||
|
||||
# Virtual filesystems
|
||||
cfg_mounts=(
|
||||
'proc:proc:/proc'
|
||||
'run:tmpfs:/run'
|
||||
'tmp:tmpfs:/tmp'
|
||||
|
||||
'proc:proc:/proc:defaults,hidepid=2'
|
||||
'sys:sysfs:/sys'
|
||||
|
||||
'dev:devtmpfs:/dev'
|
||||
|
16
rc.in
16
rc.in
@@ -29,13 +29,21 @@ rc.tmpfiles() {
|
||||
rc.mount() {
|
||||
for fs in "${cfg_mounts[@]}"; do
|
||||
echo "$fs" | while IFS=':' read device fs_type mountpoint mount_options; do
|
||||
if mountpoint -q "$mountpoint"; then
|
||||
if [[ "$mount_options" ]]; then
|
||||
mount -o "remount,$mount_options" "$mountpoint"
|
||||
fi
|
||||
else
|
||||
if ! [[ -d "$mountpoint" ]]; then
|
||||
mkdir -p "$mountpoint"
|
||||
fi
|
||||
|
||||
[[ "$mount_options" ]] || { mount_options='defaults'; }
|
||||
if ! [[ "$mount_options" ]]; then
|
||||
mount_options='defaults'
|
||||
fi
|
||||
|
||||
mountpoint -q "$mountpoint" || {
|
||||
[[ -d "$mountpoint" ]] || { mkdir -p "$mountpoint"; }
|
||||
mount "$device" -n -t "$fs_type" -o "$mount_options" "$mountpoint"
|
||||
}
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
Reference in New Issue
Block a user