[SCM] live-config branch, debian-next, updated. debian/2.0_a5-1-9-g7ad3bbd
Daniel Baumann
daniel at debian.org
Mon Jun 7 11:20:26 UTC 2010
The following commit has been merged in the debian-next branch:
commit 7ad3bbd66f28bc1b89b13755580d8becb2594c61
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Jun 7 13:08:27 2010 +0200
Adding getty and login wrappers.
diff --git a/Makefile b/Makefile
index 1889d8c..170e918 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ SHELL := sh -e
LANGUAGES = de
-SCRIPTS = scripts/config.sh scripts/config/*
+SCRIPTS = bin/* scripts/config.sh scripts/config/*
all: test build
@@ -39,8 +39,12 @@ build:
install:
# Installing scripts
+ mkdir -p $(DESTDIR)/
+ cp -r bin $(DESTDIR)
+
mkdir -p $(DESTDIR)/lib/live
cp -r scripts/config.sh scripts/config $(DESTDIR)/lib/live
+
mkdir -p $(DESTDIR)/var/lib/live/config
# Installing docs
@@ -65,8 +69,15 @@ install:
uninstall:
# Uninstalling scripts
+ for SCRIPT in bin/*; \
+ do \
+ rm -f $(DESTDIR)/bin/$(basename $${SCRIPT}); \
+ done
+ rmdir ----ignore-fail-on-non-empty $(DESTDIR)/bin
+
rm -rf $(DESTDIR)/lib/live/config.sh $(DESTDIR)/lib/live/config
rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib/live || true
+
rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib/live/config || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib/live || true
diff --git a/bin/live-getty b/bin/live-getty
new file mode 100755
index 0000000..873afad
--- /dev/null
+++ b/bin/live-getty
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+for _ARGUMENT in ${@}
+do
+ case "${ARGUMENT}" in
+ -l|-n)
+ _AUTOLOGIN="false"
+ ;;
+ esac
+done
+
+if [ "${_AUTOLOGIN}" != "false" ]
+then
+ exec /sbin/getty -n -l /sbin/live-login ${*}
+else
+ exec /sbin/getty ${*}
+fi
diff --git a/bin/live-login b/bin/live-login
new file mode 100755
index 0000000..14bbfb8
--- /dev/null
+++ b/bin/live-login
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+set -e
+
+# Reading configuration file from filesystem
+if [ -e /etc/live/config.conf ]
+then
+ . /etc/live/config.conf
+fi
+
+if ls /etc/live/config.conf.d/* > /dev/null 2>&1
+then
+ for _FILE in /etc/live/config.conf.d/*
+ do
+ . ${_FILE}
+ done
+fi
+
+# Reading configuration file from live-media
+if [ -e /live/image/live/config.conf ]
+then
+ . /live/image/live/config.conf
+fi
+
+if ls /live/image/live/config.conf.d/* > /dev/null 2>&1
+then
+ for FILE in /live/image/live/config.conf.d/*
+ do
+ . ${_FILE}
+ done
+fi
+
+LIVE_USERNAME="${LIVE_USERNAME:-root}"
+
+exec /bin/login -f "${LIVE_USERNAME}"
--
live-config
More information about the debian-live-changes
mailing list