change defaluts, move mountpoints to rc.conf
This commit is contained in:
parent
358824da8f
commit
ec2ff428f8
33
rc.conf
33
rc.conf
|
@ -1,21 +1,38 @@
|
|||
# System-wide configuration
|
||||
export PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
|
||||
export PATH='/usr/local/bin:/usr/local/sbin:/usr/bin'
|
||||
|
||||
# Hostname
|
||||
cfg_hostname='changeme'
|
||||
cfg_hostname='spark'
|
||||
|
||||
# Timezone
|
||||
# Change this to yours
|
||||
# Uncomment and change this to yours
|
||||
#cfg_timezone='Europe/Moscow'
|
||||
|
||||
# Services
|
||||
cfg_services+=( 'fsck' 'mount' 'sysctl' 'rsyslogd' ) # Services that need tp be started in an order
|
||||
cfg_services+=( '@lo.iface' '@scron' '@sshd' ) # These start in parallel.
|
||||
cfg_services+=( @agetty-tty{2..6} ) # Comment this if your init starts something on the ttys itself.
|
||||
cfg_services+=( 'rc.local' ) # Traditionally, rc.local starts last. Technically here it doesn't. Not quite :)
|
||||
# Services that start with @ are executed in parallel
|
||||
cfg_services+=(
|
||||
'fsck' 'mount' 'sysctl' 'rsyslogd'
|
||||
'@lo.iface' '@scron'
|
||||
)
|
||||
|
||||
# Add modules you want to be loaded at boot time here
|
||||
#cfg_modules=( )
|
||||
|
||||
# Make C-A-D perform a soft reset
|
||||
ctrlaltdel soft
|
||||
|
||||
# Default virtual mounts for linux systems
|
||||
cfg_mounts[proc]='proc:/proc'
|
||||
cfg_mounts[run]='tmpfs:/run'
|
||||
cfg_mounts[sys]='sysfs:/sys'
|
||||
|
||||
# devfs and its children
|
||||
cfg_mounts[dev]='devtmpfs:/dev'
|
||||
cfg_mounts[pts]='devpts:/dev/pts:noexec,nosuid,gid=5,mode=0620'
|
||||
cfg_mounts[mqueue]='mqueue:/dev/mqueue:noexec,nosuid,nodev'
|
||||
cfg_mounts[shm]='tmpfs:/dev/shm:defaults,mode=0777'
|
||||
|
||||
# Some temporary directories
|
||||
cfg_tmpdirs+=( '/run/lock' '/run/lock/lvm' '/run/lvm' '/run/user' )
|
||||
|
||||
# And temporary files
|
||||
cfg_tmpfiles+=( '/run/utmp' )
|
||||
|
|
35
rc.in
35
rc.in
|
@ -1,30 +1,4 @@
|
|||
#!@BASH_PATH@
|
||||
declare -A cfg_mounts
|
||||
|
||||
# Default virtual mounts for linux systems
|
||||
cfg_mounts[proc]='proc:/proc'
|
||||
cfg_mounts[run]='tmpfs:/run'
|
||||
cfg_mounts[sys]='sysfs:/sys'
|
||||
|
||||
# devfs and its children
|
||||
cfg_mounts[dev]='devtmpfs:/dev'
|
||||
cfg_mounts[pts]='devpts:/dev/pts:noexec,nosuid,gid=5,mode=0620'
|
||||
cfg_mounts[mqueue]='mqueue:/dev/mqueue:noexec,nosuid,nodev'
|
||||
cfg_mounts[shm]='tmpfs:/dev/shm:defaults,mode=0777'
|
||||
|
||||
# Some temporary directories
|
||||
cfg_tmpdirs+=( '/run/lock' '/run/lock/lvm' '/run/lvm' '/run/user' )
|
||||
|
||||
# And temporary files
|
||||
cfg_tmpfiles+=( '/run/utmp' )
|
||||
|
||||
# Default XDG_RUNTIME_DIR for all non-system users
|
||||
# rtkit:x:133:133:RealtimeKit:/proc:/sbin/nologin
|
||||
while IFS=':' read -r _ _ uid gid _; do
|
||||
if (( uid >= 1000 )); then
|
||||
cfg_tmpdirs+=( "/run/user/$uid:700:$uid:$gid" )
|
||||
fi
|
||||
done < /etc/passwd
|
||||
|
||||
# Functions
|
||||
rc.rescue() { exec "${cfg_rc_rescue_shell:-"$SHELL"}"; }
|
||||
|
@ -186,8 +160,17 @@ rc.timezone() {
|
|||
}
|
||||
|
||||
rc.main() {
|
||||
declare -A cfg_mounts
|
||||
source "@ETC@/rc.conf"
|
||||
|
||||
# Default XDG_RUNTIME_DIR for all non-system users
|
||||
# rtkit:x:133:133:RealtimeKit:/proc:/sbin/nologin
|
||||
while IFS=':' read -r _ _ uid gid _; do
|
||||
if (( uid >= 1000 )); then
|
||||
cfg_tmpdirs+=( "/run/user/$uid:700:$uid:$gid" )
|
||||
fi
|
||||
done < /etc/passwd
|
||||
|
||||
action="${1:-boot}"
|
||||
|
||||
case "$action" in
|
||||
|
|
Loading…
Reference in New Issue
Block a user