7 Commits
1.8.3 ... 1.9.1

Author SHA1 Message Date
fbt
0afbcc55f2 rc.mount rewrite 2015-10-27 18:43:56 +03:00
fbt
1d5e825201 a huge oops 2015-10-26 19:16:18 +03:00
fbt
15592c0daa this should be a decent default 2015-10-14 10:03:58 +03:00
fbt
e379e8efff set the locale in rc.conf 2015-10-13 11:23:10 +03:00
fbt
9363ea33f5 agettys 2015-09-07 23:01:14 +03:00
fbt
92b8205255 on a second thought, the default IFS sucks 2015-09-01 13:05:37 +03:00
fbt
5dad6a777e default IFS, add tmp 2015-09-01 13:02:18 +03:00
2 changed files with 26 additions and 13 deletions

23
rc.conf
View File

@@ -1,6 +1,9 @@
# System-wide configuration # A default PATH
export PATH='/usr/local/bin:/usr/local/sbin:/usr/bin' export PATH='/usr/local/bin:/usr/local/sbin:/usr/bin'
# Locale
export LC_ALL='en_US.UTF-8'
# Hostname # Hostname
cfg_hostname='spark' cfg_hostname='spark'
@@ -11,7 +14,7 @@ cfg_hostname='spark'
# Services that start with @ are executed in parallel # Services that start with @ are executed in parallel
cfg_services+=( cfg_services+=(
'fsck' 'mount' 'sysctl' 'rsyslogd' '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 # Uncomment and add modules you want to be loaded at boot time here
@@ -22,14 +25,16 @@ ctrlaltdel soft
# Virtual filesystems # Virtual filesystems
cfg_mounts=( cfg_mounts=(
'proc:proc:/proc' 'run:tmpfs:/run'
'run:tmpfs:/run' 'tmp:tmpfs:/tmp'
'sys:sysfs:/sys'
'dev:devtmpfs:/dev' 'proc:proc:/proc:defaults,hidepid=2'
'pts:devpts:/dev/pts:noexec,nosuid,gid=5,mode=0620' 'sys:sysfs:/sys'
'mqueue:mqueue:/dev/mqueue:noexec,nosuid,nodev'
'shm:tmpfs:/dev/shm:defaults,mode=0777' 'dev:devtmpfs:/dev'
'pts:devpts:/dev/pts:noexec,nosuid,gid=5,mode=0620'
'mqueue:mqueue:/dev/mqueue:noexec,nosuid,nodev'
'shm:tmpfs:/dev/shm:defaults,mode=0777'
) )
# Some temporary directories and files # Some temporary directories and files

16
rc.in
View File

@@ -29,13 +29,21 @@ rc.tmpfiles() {
rc.mount() { rc.mount() {
for fs in "${cfg_mounts[@]}"; do for fs in "${cfg_mounts[@]}"; do
echo "$fs" | while IFS=':' read device fs_type mountpoint mount_options; 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" mount "$device" -n -t "$fs_type" -o "$mount_options" "$mountpoint"
} fi
done done
done done
} }