Giter VIP home page Giter VIP logo

minit's Introduction

minit - mini init

A small init daemon forked from sinit with basic halting capabilities.

It is considered complete and stable, and will not be worked upon.

Building and installing

minit can be configured from config.h before compile time. After editing you can simply build and install with

make
make install

Usage Note

This halting capability adds 2 signals to the init daemon, SIGUSR2 and SIGQUIT. Keep in mind that you do not want to send these signals standalone, as they will power your computer off, they will not run through your init scripts or anything. You must send these signals from the init scripts so your computer shuts down (or reboots) after you deal with the delicate parts of your shutdown process.

Controlling minit

You can add some basic poweroff/reboot programs so you don't have to remember which signal to send with your kill command.

A basic poweroff would be

#!/bin/sh
/bin/kill -s USR1 1

A basic reboot would be

#!/bin/sh
/bin/kill -s INT 1

On your init script, you can add something like

case "$1" in
    reboot) /bin/kill -s QUIT 1 ;;
    poweroff) /bin/kill -s USR2 1 ;;
esac

minit's People

Contributors

cemkeylan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

moneytech

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.