- zsh is used instead of bash. - passwd, shadow and group are added, as users are required as some point. - mdev.conf added to populate /dev. - sysctl.conf added… it’s empty, but at least there’s a skeleton.master
parent
64869c410f
commit
50357fe1f9
@ -0,0 +1,27 @@
|
||||
root::0:root
|
||||
bin::1:root,bin,daemon
|
||||
daemon::2:root,bin,daemon
|
||||
sys::3:root,bin
|
||||
adm::4:root,daemon
|
||||
tty::5:
|
||||
disk::6:root
|
||||
lp::7:daemon
|
||||
mem::8:
|
||||
kmem::9:
|
||||
wheel::10:root
|
||||
ftp::11:
|
||||
mail::12:
|
||||
mlocate::13:
|
||||
dialout::14:
|
||||
www::15:
|
||||
audio::16:
|
||||
video::17:
|
||||
floppy::18:
|
||||
tape::19:
|
||||
scanner::20:
|
||||
cdrom::21:
|
||||
input::22:
|
||||
kvm::23:
|
||||
nobody::99:
|
||||
messagebus::81:
|
||||
users::100:
|
@ -0,0 +1,118 @@
|
||||
# mdev-like-a-boss
|
||||
|
||||
# Syntax:
|
||||
# [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
|
||||
# [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
|
||||
# [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
|
||||
#
|
||||
# [-]: do not stop on this match, continue reading mdev.conf
|
||||
# =: move, >: move and create a symlink
|
||||
# !: do not create device node
|
||||
# @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases
|
||||
|
||||
# support module loading on hotplug
|
||||
$MODALIAS=.* root:root 660 @modprobe -b "$MODALIAS"
|
||||
|
||||
# null may already exist; therefore ownership has to be changed with command
|
||||
null root:root 666 @chmod 666 $MDEV
|
||||
zero root:root 666
|
||||
full root:root 666
|
||||
random root:root 444
|
||||
urandom root:root 444
|
||||
hwrandom root:root 444
|
||||
grsec root:root 660
|
||||
|
||||
# Kernel-based Virtual Machine.
|
||||
kvm root:kvm 660
|
||||
|
||||
# vhost-net, to be used with kvm.
|
||||
vhost-net root:kvm 660
|
||||
|
||||
kmem root:root 640
|
||||
mem root:root 640
|
||||
port root:root 640
|
||||
# console may already exist; therefore ownership has to be changed with command
|
||||
console root:tty 600 @chmod 600 $MDEV
|
||||
ptmx root:tty 666
|
||||
pty.* root:tty 660
|
||||
|
||||
# Typical devices
|
||||
tty root:tty 666
|
||||
tty[0-9]* root:tty 660
|
||||
vcsa*[0-9]* root:tty 660
|
||||
ttyS[0-9]* root:tty 660
|
||||
|
||||
# block devices
|
||||
ram([0-9]*) root:disk 660 >rd/%1
|
||||
loop([0-9]+) root:disk 660 >loop/%1
|
||||
sd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device
|
||||
vd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device
|
||||
hd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device
|
||||
md[0-9]* root:disk 660 */opt/mdev/helpers/storage-device
|
||||
dm-[0-9]* root:disk 660 */opt/mdev/helpers/storage-device
|
||||
bcache[0-9]* root:disk 660 */opt/mdev/helpers/storage-device
|
||||
mmcblk[0-9].* root:disk 660 */opt/mdev/helpers/storage-device
|
||||
sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom
|
||||
fd[0-9]* root:floppy 660
|
||||
|
||||
# Run settle-nics every time new NIC appear.
|
||||
# If you don't want to auto-populate /etc/mactab with NICs, run 'settle-nis' without '--write-mactab' param.
|
||||
-SUBSYSTEM=net;DEVPATH=.*/net/.*;.* root:root 600 @/opt/mdev/helpers/settle-nics --write-mactab
|
||||
|
||||
net/tun[0-9]* root:kvm 660
|
||||
net/tap[0-9]* root:root 600
|
||||
|
||||
# alsa sound devices and audio stuff
|
||||
SUBSYSTEM=sound;.* root:audio 660 @/opt/mdev/helpers/sound-control
|
||||
|
||||
adsp root:audio 660 >sound/
|
||||
audio root:audio 660 >sound/
|
||||
dsp root:audio 660 >sound/
|
||||
mixer root:audio 660 >sound/
|
||||
sequencer.* root:audio 660 >sound/
|
||||
|
||||
|
||||
# raid controllers
|
||||
cciss!(.*) root:disk 660 =cciss/%1
|
||||
ida!(.*) root:disk 660 =ida/%1
|
||||
rd!(.*) root:disk 660 =rd/%1
|
||||
|
||||
|
||||
fuse root:root 666
|
||||
|
||||
card[0-9] root:video 660 =dri/
|
||||
|
||||
agpgart root:root 660 >misc/
|
||||
psaux root:root 660 >misc/
|
||||
rtc root:root 664 >misc/
|
||||
|
||||
# input stuff
|
||||
SUBSYSTEM=input;.* root:input 660
|
||||
|
||||
# v4l stuff
|
||||
vbi[0-9] root:video 660 >v4l/
|
||||
video[0-9] root:video 660 >v4l/
|
||||
|
||||
# dvb stuff
|
||||
dvb.* root:video 660
|
||||
|
||||
# drm etc
|
||||
dri/.* root:video 660
|
||||
|
||||
# Don't create old usbdev* devices.
|
||||
usbdev[0-9].[0-9]* root:root 660 !
|
||||
|
||||
# Stop creating x:x:x:x which looks like /dev/dm-*
|
||||
[0-9]+\:[0-9]+\:[0-9]+\:[0-9]+ root:root 660 !
|
||||
|
||||
# /dev/cpu support.
|
||||
microcode root:root 600 =cpu/
|
||||
cpu([0-9]+) root:root 600 =cpu/%1/cpuid
|
||||
msr([0-9]+) root:root 600 =cpu/%1/msr
|
||||
|
||||
# Populate /dev/bus/usb.
|
||||
SUBSYSTEM=usb;DEVTYPE=usb_device;.* root:root 660 */opt/mdev/helpers/dev-bus-usb
|
||||
|
||||
# Catch-all other devices, Right now useful only for debuging.
|
||||
#.* root:root 660 */opt/mdev/helpers/catch-all
|
||||
|
@ -0,0 +1,8 @@
|
||||
root:x:0:0:root:/root:/usr/bin/zsh
|
||||
bin:x:1:1:bin:/bin:
|
||||
daemon:x:2:2:daemon:/sbin:
|
||||
mail:x:8:12:mail:/var/spool/mail:
|
||||
ftp:x:14:11:ftp:/var/ftp:
|
||||
www:x:15:15:www:/var/www:/bin/false
|
||||
messagebus:x:81:81::/var/empty:/bin/false
|
||||
nobody:x:99:99:nobody:/:
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# /etc/rc.local: local multi-user startup script
|
||||
# /etc/rc.local: local startup script
|
||||
#
|
||||
|
||||
# End of file
|
||||
|
@ -1,8 +1,12 @@
|
||||
#!/bin/bash
|
||||
#!/bin/zsh
|
||||
#
|
||||
# /etc/rc.modules: module initialization script
|
||||
#
|
||||
|
||||
/sbin/depmod -a
|
||||
|
||||
# FIXME: Is this even necessary? Is this even *desirable*?
|
||||
/bin/busybox find /sys -name modalias -type f -print0 | xargs -0 sort -u \
|
||||
| /bin/bin/busybox xargs modprobe -b -a 2> /dev/null
|
||||
|
||||
# End of file
|
||||
|
@ -0,0 +1,5 @@
|
||||
#
|
||||
# /etc/sysctl.conf: configuration for system variables, see sysctl.conf(5)
|
||||
#
|
||||
|
||||
# End of file
|
Loading…
Reference in new issue