13 Commits
Author SHA1 Message Date
wt f88a493554 Merge pull request 'develop' (#5) from develop into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/initscripts/pulls/5
2025-07-25 18:13:55 +07:00
wt 1446e568d2 Update root 2025-07-25 17:47:31 +07:00
wt 4e02096844 added crond dep dirs and files 2025-07-25 17:44:18 +07:00
wt c6c48105c6 Create motd 2025-07-25 17:37:03 +07:00
wt eb866ba951 Update syslogd.service 2025-07-25 17:34:45 +07:00
wt 2505711edd Update ntpd.service 2025-07-25 17:33:19 +07:00
wt 87d86330da added ntpd 2025-07-25 17:27:40 +07:00
wt 1db34c6ec6 added mdev 2025-07-25 17:17:31 +07:00
wt 64a663b672 added swap 2025-07-25 16:37:35 +07:00
wt 7e995fc336 Merge pull request 'updated' (#4) from update into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/initscripts/pulls/4
2025-07-25 16:27:01 +07:00
wt 2e447ea0d6 updated 2025-07-25 16:26:16 +07:00
wt 791161dc93 Merge pull request 'update orders and added crond.service' (#3) from crond into main
Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/initscripts/pulls/3
2025-07-25 16:16:31 +07:00
wt 39d2677f03 update orders and added crond.service 2025-07-25 16:15:14 +07:00
24 changed files with 349 additions and 17 deletions
+8
View File
@@ -0,0 +1,8 @@
# do daily/weekly/monthly maintenance
# min hour day month weekday command
*/15 * * * * run-parts /etc/periodic/15min
0 * * * * run-parts /etc/periodic/hourly
0 2 * * * run-parts /etc/periodic/daily
0 3 * * 6 run-parts /etc/periodic/weekly
0 5 1 * * run-parts /etc/periodic/monthly
0 0 3 4 * run-parts /etc/periodic/yearly
+12
View File
@@ -1,5 +1,17 @@
root:x:0:root
tty:x:5:
disk:x:6:root
kmem:x:9:
floppy:x:11:root
audio:x:18:
cdrom:x:19:
dialout:x:20:root
input:x:23:
tape:x:26:root
video:x:27:root
netdev:x:28:
dnsmasq:x:963:dnsmasq
sshd:x:33:sshd
kvm:x:34:kvm
nobody:x:65534:
gitea:x:1000:
+1
View File
@@ -0,0 +1 @@
../../usr/lib/init/services/crond.service
+1
View File
@@ -0,0 +1 @@
../../usr/lib/init/services/mdev.service
+1
View File
@@ -0,0 +1 @@
../../usr/lib/init/services/netplugd.service
+1
View File
@@ -0,0 +1 @@
../../usr/lib/init/services/ntpd.service
+1
View File
@@ -0,0 +1 @@
../../usr/lib/init/services/swap.service
+157
View File
@@ -0,0 +1,157 @@
#
# This is a sample mdev.conf.
#
# Devices:
# Syntax: %s %d:%d %s
# devices user:group mode
$MODALIAS=.* root:root 0660 @modprobe -q -b "$MODALIAS"
# null does already exist; therefore ownership has to be changed with command
null root:root 0666 @chmod 666 $MDEV
zero root:root 0666
full root:root 0666
random root:root 0666
urandom root:root 0444
hwrandom root:root 0660
console root:tty 0600
# load frambuffer console when first frambuffer is found
fb0 root:video 0660 @modprobe -q -b fbcon
fd0 root:floppy 0660
kmem root:kmem 0640
mem root:kmem 0640
port root:kmem 0640
ptmx root:tty 0666
# Kernel-based Virtual Machine.
kvm root:kvm 660
# ram.*
ram([0-9]*) root:disk 0660 >rd/%1
loop([0-9]+) root:disk 0660 >loop/%1
# persistent storage
dasd.* root:disk 0660 */lib/mdev/persistent-storage
mmcblk.* root:disk 0660 */lib/mdev/persistent-storage
nbd.* root:disk 0660 */lib/mdev/persistent-storage
nvme.* root:disk 0660 */lib/mdev/persistent-storage
sd[a-z].* root:disk 0660 */lib/mdev/persistent-storage
sr[0-9]+ root:cdrom 0660 */lib/mdev/persistent-storage
vd[a-z].* root:disk 0660 */lib/mdev/persistent-storage
xvd[a-z].* root:disk 0660 */lib/mdev/persistent-storage
md[0-9] root:disk 0660
tty root:tty 0666
tty[0-9] root:root 0600
tty[0-9][0-9] root:tty 0660
ttyS[0-9]* root:dialout 0660
ttyGS[0-9] root:root 0660
pty.* root:tty 0660
vcs[0-9]* root:tty 0660
vcsa[0-9]* root:tty 0660
# rpi bluetooth
#ttyAMA0 root:tty 660 @btattach -B /dev/$MDEV -P bcm -S 115200 -N &
ttyACM[0-9] root:dialout 0660 @ln -sf $MDEV modem
ttyUSB[0-9] root:dialout 0660 @ln -sf $MDEV modem
ttyLTM[0-9] root:dialout 0660 @ln -sf $MDEV modem
ttySHSF[0-9] root:dialout 0660 @ln -sf $MDEV modem
slamr root:dialout 0660 @ln -sf $MDEV slamr0
slusb root:dialout 0660 @ln -sf $MDEV slusb0
fuse root:root 0666
# mobile broadband modems
cdc-wdm[0-9]+ root:dialout 0660
# dri device
dri/.* root:video 0660
card[0-9] root:video 0660 =dri/
# alsa sound devices and audio stuff
pcm.* root:audio 0660 =snd/
control.* root:audio 0660 =snd/
midi.* root:audio 0660 =snd/
seq root:audio 0660 =snd/
timer root:audio 0660 =snd/
adsp root:audio 0660 >sound/
audio root:audio 0660 >sound/
dsp root:audio 0660 >sound/
mixer root:audio 0660 >sound/
sequencer.* root:audio 0660 >sound/
SUBSYSTEM=sound;.* root:audio 0660
# PTP devices
ptp[0-9] root:root 0660 */lib/mdev/ptpdev
# virtio-ports
SUBSYSTEM=virtio-ports;vport.* root:root 0600 @mkdir -p virtio-ports; ln -sf ../$MDEV virtio-ports/$(cat /sys/class/virtio-ports/$MDEV/name)
# misc stuff
agpgart root:root 0660 >misc/
psaux root:root 0660 >misc/
rtc root:root 0664 >misc/
# input stuff
SUBSYSTEM=input;.* root:input 0660
# v4l stuff
-vbi[0-9] root:video 0660
vbi[0-9] root:video 0660 >v4l/
-video[0-9]+ root:video 0660
video[0-9]+ root:video 0660 >v4l/
-media[0-9]+ root:video 0660
media[0-9]+ root:video 0660 >v4l/
# dvb stuff
dvb.* root:video 0660 */lib/mdev/dvbdev
# VideoCore VC4 BCM GPU specific (as in Pi devices)
vchiq root:video 0660
vcio root:video 0660
vcsm-cma root:video 0660
vc-mem root:video 0660
# load drivers for usb devices
usb[0-9]+ root:root 0660 */lib/mdev/usbdev
# net devices
# 666 is fine: https://www.kernel.org/doc/Documentation/networking/tuntap.txt
net/tun[0-9]* root:netdev 0666
net/tap[0-9]* root:netdev 0666
SUBSYSTEM=net;INTERFACE=.*;.* root:root 600 @test -r /etc/mactab && nameif -s
# zaptel devices
zap(.*) root:dialout 0660 =zap/%1
dahdi!(.*) root:dialout 0660 =dahdi/%1
dahdi/(.*) root:dialout 0660 =dahdi/%1
# raid controllers
cciss!(.*) root:disk 0660 =cciss/%1
cciss/(.*) root:disk 0660 =cciss/%1
ida!(.*) root:disk 0660 =ida/%1
ida/(.*) root:disk 0660 =ida/%1
rd!(.*) root:disk 0660 =rd/%1
rd/(.*) root:disk 0660 =rd/%1
# tape devices
nst[0-9]+.* root:tape 0660
st[0-9]+.* root:tape 0660
# VirtualBox devices
vboxguest root:root 0600
vboxuser root:root 0666
vboxdrv root:root 0600
vboxdrvu root:root 0666
vboxnetctl root:root 0600
# fallback for any!device -> any/device
(.*)!(.*) root:root 0660 =%1/%2
View File
View File
+3
View File
@@ -0,0 +1,3 @@
Welcome to Simple Linux!
You may change this message by editing /etc/motd.
+5
View File
@@ -0,0 +1,5 @@
config timeserver 'ntp'
option enabled '1'
option enable_server '0' # Set to '1' to enable NTP server functionality
list server 'pool.ntp.org'
list server 'time.nist.gov'
View File
View File
View File
View File
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
CROND_OPTS=""
start() {
notify "Starting crond"
/usr/bin/crond $CROND_OPTS
check $? "start crond"
return $?
}
stop() {
notify "Stopping crond"
kill $(cat /var/run/crond.pid)
check $? "stop crond"
rm /var/run/crond.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?
View File
+35
View File
@@ -0,0 +1,35 @@
#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting mdev"
mkdir -p /dev
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
for i in $(find /sys/devices -name 'usb[0-9]*'); do
[ -e $i/uevent ] && echo add > $i/uevent
done
/usr/bin/mdev -s -S
check $? "start mdev"
return $?
}
stop() {
notify "Stopping mdev"
echo > /proc/sys/kernel/hotplug
check $? "stop mdev"
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?
+37
View File
@@ -0,0 +1,37 @@
#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
NTPD_OPTS="-N -p pool.ntp.org -n"
if [ -f /etc/ntp.conf ]; then
NTPD_OPTS="-N -n"
fi
start() {
notify "Starting ntpd"
/usr/bin/ntpd $NTPD_OPTS &
check $? "start ntpd"
echo $(pgrep ntpd) > /var/run/ntpd.pid
return $?
}
stop() {
notify "Stopping ntpd"
kill $(cat /var/run/ntpd.pid)
check $? "stop ntpd"
rm /var/run/ntpd.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
SWAPON_OPTS="-a"
SWAPOFF_OPTS="-a"
start() {
notify "Starting swap"
/usr/bin/swapon $SWAPON_OPTS
check $? "start swap"
return $?
}
stop() {
notify "Stopping swap"
/usr/bin/swapoff $SWAPOFF_OPTS
check $? "stop swap"
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?
+1 -1
View File
@@ -7,7 +7,7 @@
start() {
notify "Starting syslogd"
/usr/bin/syslogd
/usr/bin/syslogd -t -n &
check $? "start syslogd"
return $?
}
+19 -15
View File
@@ -1,18 +1,22 @@
01hostname
02klogd
03syslogd
04swap
05networking
06sysctl
07dnsmasq
08dnsd
09telnetd
10sshd
11iptables
12ftpd
13hostapd
14httpd
15nginx
16openrouterinit
17dropbear
18gitea
04mdev
05swap
06networking
07ntpd
08netplugd
09sysctl
10crond
11dnsmasq
12dnsd
13telnetd
14sshd
15iptables
16ftpd
17hostapd
18httpd
19nginx
20openrouterinit
21dropbear
22gitea
View File