Skip to content

System64fumo/rc-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

rc-scripts

This repository holds the rc scripts that i use on my systems

Installation

To install and use these scripts on your system you need to do the following:

  1. mkdir /opt/busybox
  2. Download busybox and put it in /opt/busybox
  3. Install busybox by either symlinking or running /opt/busybox/busybox --install -s /opt/busybox/
  4. git clone https://github.com/System64fumo/rc-scripts
  5. sudo mv ./rc-scripts/rc.d /etc/rc.d
  6. sudo mv ./rc-scripts/inittab /etc/inittab
  7. sudo rm /bin/{init,poweroff,reboot}
  8. sudo ln -s /opt/busybox/init /bin/init
  9. sudo ln -s /opt/busybox/poweroff /bin/poweroff
  10. sudo ln -s /opt/busybox/reboot /bin/reboot

Do note: After following the installation guide,
You will not be able to reboot your system normally for the first time (Since we replaced the original poweroff file)
Also any updates to your init system of choice will restore the original init,
So add your init system to your package manager's ignore/block list.

Configuration and usage

To manually start or stop a service, Run the service script.
Example: sudo /etc/rc.d/script start sshd

To configure which services load when you boot the system up,
Edit /etc/rc.d/init.

To configure what happens when you shut the system down,
Edit /etc/rc.d/shutdown.

To configure service settings, (Such as zram size, Network details, ect..)
Edit /etc/rc.d/config.

To configure ttys or autologin, (The default autologin is for root on tty1)
Edit /etc/inittab.

Additional information

By default the service loader will use busybox,
Uncomment the export line in /etc/rc.d/service to use native system bins if you wish.

The splash screen configuration /etc/rc.d/splash/fbsplash.ini assumes your monitor resolution is 1080p.

Important

The default configuration assumes a lot, Such as:
Running on a non systemd based distro
Connected via ethernet on eth0 with a static ip addr
Using pipewire for audio
Please change it to match your system and your needs.

Note

Some services should not run as the root user (Such as audio for example)
You can use su to start them automatically in /etc/rc.d/init

Why do any of this? And why busybox?

The following answers are based on my opinion, Feel free to disagree.
I personally like the way sysvinit style init systems work (Shell script based init systems)
I find it easier to configure and do everything i want this way too
The speed and performance of existing init systems did not satisfy me.

As for the busybox question, Honestly?
I just wanted to mess around with busybox a while back and tried it's init system, So it kinda stuck
I am fully aware that busybox is not exactly the best thing out there,
However i'm too lazy to switch to something else