create simple init program in rust scripts for all basic tasks in devuan without any…
- User
create simple init program in rust scripts for all basic tasks in devuan without any dbus, systemvinit, systemd, elogind, x11, xorg, xinit, systemctl, nix. the original init program is called sysx with a command line for interacting with tasks.
- Assistant
Creating a simple and minimal init program in Rust without any dependencies on dbus, systemvinit, systemd, elogind, x11, xorg, xinit, systemctl, or nix might look like this:
- User
write rust script tasks for sysx init for devuan without any server applications, nix, sysvinit, systemd, dbus, x11, xorg, elogind, xinit, systemctl. tasks include, kernel, kernel firewall, selinux, apparmor, networking, procps, kmod, udev, console-setup, haveged, keyboard-setup.sh, mouse, rc.local, rsC
- Assistant
Creating a minimal
/etc/sysx/tasksfile for the sysx init system without using server applications, nix, sysvinit, systemd, dbus, x11, xorg, elogind, xinit, or systemctl can include the following tasks:# /etc/sysx/tasks # # Kernel echo "Starting kernel ..." /sbin/sysctl -p --system # Kernel Firewall echo "Starting firewall ..." /sbin/iptables-restore < /etc/iptables/rules.v4 /sbin/ip6tables-restore < /etc/iptables/rules.v6 # SELinux echo "Starting SELinux ..." /sbin/setenforce 1 # AppArmor echo "Starting AppArmor ..." /sbin/apparmor_parser -r /etc/apparmor.d/*-profile-name # Networking echo "Starting networking ..." /sbin/ifup -a /sbin/service networking restart # Procps echo "Starting procps ..." /sbin/sysctl --system # Kmod echo "Starting kmod ..." /sbin/depmod /sbin/modprobe -a # Udev echo "Starting udev ..." /sbin/udevd --daemon /sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add /sbin/udevadm settle # Console Setup echo "Starting console setup ..." /sbin/setupcon # Haveged echo "Starting haveged ..." /usr/sbin/haveged -w 1024 -v 1 # Keyboard Setup echo "Starting keyboard setup ..." /sbin/keyboard-setup.sh # Mouse echo "Starting mouse ..." /sbin/modprobe psmouse # rc.local if [ -x /etc/rc.local ]; then echo "Starting rc.local ..." /etc/rc.local fi # rsC echo "Running rsC ..." /sbin/runlevel --set C