Browse Source

Re-made patch add-runit.diff

master
fsmithred 1 month ago
parent
commit
62f54acc86
2 changed files with 97 additions and 0 deletions
  1. +96
    -0
      debian/patches/add-runit.diff
  2. +1
    -0
      debian/patches/series

+ 96
- 0
debian/patches/add-runit.diff View File

@@ -0,0 +1,96 @@
Add support for runit-init.
--- a/Makefile
+++ b/Makefile
@@ -53,9 +53,9 @@
mkdir -p $(DESTDIR)/etc/init.d
cp backend/sysvinit/live-config.init $(DESTDIR)/etc/init.d/live-config
- mkdir -p $(DESTDIR)/lib/systemd/system $(DESTDIR)/lib/systemd/system-generators
- cp backend/systemd/live-config.systemd $(DESTDIR)/lib/systemd/system/live-config.service
- cp backend/systemd/live-config-getty-generator $(DESTDIR)/lib/systemd/system-generators/
+# mkdir -p $(DESTDIR)/lib/systemd/system $(DESTDIR)/lib/systemd/system-generators
+# cp backend/systemd/live-config.systemd $(DESTDIR)/lib/systemd/system/live-config.service
+# cp backend/systemd/live-config-getty-generator $(DESTDIR)/lib/systemd/system-generators/
# Installing frontend and components
mkdir -p $(DESTDIR)/bin $(DESTDIR)/lib/live/config
--- /dev/null
+++ b/components/0190-runit
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+## live-config(7) - System Configuration Components
+## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
+##
+## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+#set -e
+
+Cmdline ()
+{
+ # Reading kernel command line
+ for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
+ do
+ case "${_PARAMETER}" in
+ live-config.noautologin|noautologin)
+ LIVE_CONFIG_NOAUTOLOGIN="true"
+ ;;
+
+ live-config.nottyautologin|nottyautologin)
+ LIVE_CONFIG_NOTTYAUTOLOGIN="true"
+ ;;
+
+ live-config.username=*|username=*)
+ LIVE_USERNAME="${_PARAMETER#*username=}"
+ ;;
+ esac
+ done
+}
+
+Init ()
+{
+ # Disables both console and graphical autologin.
+ case "${LIVE_CONFIG_NOAUTOLOGIN}" in
+ true)
+ exit 0
+ ;;
+ esac
+
+ # Disables console autologin, no matter what mechanism
+ case "${LIVE_CONFIG_NOTTYAUTOLOGIN}" in
+ true)
+ exit 0
+ ;;
+ esac
+
+ # Checking if package is installed or already configured
+ if [ ! -e /var/lib/dpkg/info/runit.list ] || \
+ [ -e /var/lib/live/config/runit ]
+ then
+ exit 0
+ fi
+
+ echo -n " runit"
+}
+
+Config ()
+{
+ # Configure autologin
+ if [ -n "${LIVE_USERNAME}" ]
+ then
+
+ sed -i 's/^\(.*\)getty\(.*\)38400/\1getty -a '${LIVE_USERNAME}' 38400/' /etc/sv/getty-tty[1-6]/run
+
+ fi
+
+ echo -n " tty-autologin"
+ # Creating state file
+ touch /var/lib/live/config/runit
+}
+
+Cmdline
+Init
+Config

+ 1
- 0
debian/patches/series View File

@@ -0,0 +1 @@
add-runit.diff

Loading…
Cancel
Save