Giter VIP home page Giter VIP logo

initrc's Introduction

InitRC

A minimal Linux init system, made in C.

Made by Breadtard who deleted the repo, then his account, then recreated both for some reason. All development is going on there. Give him a star or something.

Compiling and installation

To compile InitRC from source and install it, first make sure you have a C compiler and the Linux kernel headers. Then run either

make
sudo make install

to do it with make

or

sudo mv /bin/init /bin/init.old
sudo cc initrc.c -o /bin/init -O3

if you want to compile it manually.

Bootup

On bootup, initrc will first mount the pseudofilesystems, then run /etc/initrc/rc, then /etc/initrc/networkrc, then run /etc/initrc/user. After killing TTY1, InitRC will run /etc/initrc/shutdown and then poweroff the machine.

initrc/rc is meant to start essenial services, such as the dbus, set the time, hostname, etc.

initrc/networkrc is meant to, well, start the network.

initrc/user is meant to run user-created scripts in the initrc directory that arent essential to the system bootup, so it gets ran as last.

initrc/shutdown is for stopping processes and preparing to shutdown. As an example, you can use this script to stop sshd before shutting down.

InitRC doesnt have default rc files, you have to make those yourself.

User Scripts

User scripts are a new feature in initrc v0.5. First, create your userscripts in /etc/initrc/, then in /etc/initrc/user add a line that starts it, for example:

#!/bin/bash
sh -c "/etc/initrc/userscipt-X" # you dont have to call it userscript-X but this is an example
exit

initrc's People

Contributors

powerman2206 avatar

Stargazers

Bocke avatar

Forkers

mrveink

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.