OLPC-specific improvements, forward ported from the OLPC-2 fork.
Split "readonly rootfs / tmpfs" parts of original olpc patch into new
'readonly' patch; plus add additional support for preserving changes to
/etc/ssh, /etc/sysconfig/i18n, /etc/timezone, /var/lib/dbus/machine-id,
and /var/lib/random-seed.
Add "pretty boot" support: bring up localhost before rhgb-client is
invoked; some additional calls to rhgb-client; make sure that we
cleanly exit pretty boot if interactive boot mode is invoked.
This commit is contained in:
parent
3c0aa84114
commit
5176e143a3
3 changed files with 101 additions and 1 deletions
44
initscripts-8.76.2-prettyboot.patch
Normal file
44
initscripts-8.76.2-prettyboot.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
diff -ruHp initscripts-8.76.2.orig/rc.d/rc initscripts-8.76.2/rc.d/rc
|
||||
--- initscripts-8.76.2.orig/rc.d/rc 2008-06-26 19:04:43.000000000 -0400
|
||||
+++ initscripts-8.76.2/rc.d/rc 2008-06-26 20:12:30.000000000 -0400
|
||||
@@ -43,6 +43,8 @@ UPSTART=
|
||||
if [ "$previous" = "N" ]; then
|
||||
if [ "$do_confirm" = "yes" ]; then
|
||||
echo $"Entering interactive startup"
|
||||
+ # bail out of pretty boot
|
||||
+ chvt 1
|
||||
else
|
||||
echo $"Entering non-interactive startup"
|
||||
fi
|
||||
diff -ruHp initscripts-8.76.2.orig/rc.d/rc.sysinit initscripts-8.76.2/rc.d/rc.sysinit
|
||||
--- initscripts-8.76.2.orig/rc.d/rc.sysinit 2008-06-26 19:04:43.000000000 -0400
|
||||
+++ initscripts-8.76.2/rc.d/rc.sysinit 2008-06-26 20:12:30.000000000 -0400
|
||||
@@ -11,6 +11,14 @@ unamer=`uname -r`
|
||||
|
||||
set -m
|
||||
|
||||
+if [ -x /usr/bin/rhgb-client ] ; then
|
||||
+ # OLPC's rhgb-client depends on localhost being up
|
||||
+ /sbin/ip addr add 127.0.0.1/8 dev lo
|
||||
+ /sbin/ip addr add ::1/128 dev lo
|
||||
+ /sbin/ip link set lo up
|
||||
+ /usr/bin/rhgb-client --update=sysinit-top # early "we're alive" indication
|
||||
+fi
|
||||
+
|
||||
if [ -f /etc/sysconfig/network ]; then
|
||||
. /etc/sysconfig/network
|
||||
fi
|
||||
@@ -284,10 +292,13 @@ if [ -x /bin/taskset ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+update_boot_stage udev
|
||||
+( sleep 3 ; update_boot_stage udev_mid ) &
|
||||
nashpid=$(pidof nash 2>/dev/null)
|
||||
[ -n "$nashpid" ] && kill $nashpid >/dev/null 2>&1
|
||||
unset nashpid
|
||||
/sbin/start_udev
|
||||
+update_boot_stage udev_post
|
||||
|
||||
# Load other user-defined modules
|
||||
for file in /etc/sysconfig/modules/*.modules ; do
|
||||
45
initscripts-8.76.2-readonly.patch
Normal file
45
initscripts-8.76.2-readonly.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
diff -ruHp initscripts-8.76.2.orig/rwtab initscripts-8.76.2/rwtab
|
||||
--- initscripts-8.76.2.orig/rwtab 2008-06-26 19:04:43.000000000 -0400
|
||||
+++ initscripts-8.76.2/rwtab 2008-06-26 20:07:04.000000000 -0400
|
||||
@@ -24,9 +24,7 @@ empty /var/tux
|
||||
empty /media
|
||||
|
||||
files /etc/adjtime
|
||||
-files /etc/mtab
|
||||
files /etc/ntp.conf
|
||||
-files /etc/resolv.conf
|
||||
files /etc/lvm/.cache
|
||||
files /etc/lvm/archive
|
||||
files /etc/lvm/backup
|
||||
diff -ruHp initscripts-8.76.2.orig/statetab initscripts-8.76.2/statetab
|
||||
--- initscripts-8.76.2.orig/statetab 2008-06-26 19:04:43.000000000 -0400
|
||||
+++ initscripts-8.76.2/statetab 2008-06-26 20:08:03.000000000 -0400
|
||||
@@ -10,3 +10,8 @@
|
||||
# /etc/ssh
|
||||
# /var/spool/mail
|
||||
#
|
||||
+/etc/ssh
|
||||
+/etc/sysconfig/i18n
|
||||
+/etc/timezone
|
||||
+/var/lib/dbus
|
||||
+/var/lib/random-seed
|
||||
diff -ruHp initscripts-8.76.2.orig/sysconfig/readonly-root initscripts-8.76.2/sysconfig/readonly-root
|
||||
--- initscripts-8.76.2.orig/sysconfig/readonly-root 2008-06-26 19:04:43.000000000 -0400
|
||||
+++ initscripts-8.76.2/sysconfig/readonly-root 2008-06-26 20:08:03.000000000 -0400
|
||||
@@ -2,7 +2,7 @@
|
||||
READONLY=no
|
||||
# Set to 'yes' to mount various temporary state as either tmpfs
|
||||
# or on the block device labelled RW_LABEL. Implied by READONLY
|
||||
-TEMPORARY_STATE=no
|
||||
+TEMPORARY_STATE=yes
|
||||
# Place to put a tmpfs for temporary scratch writable space
|
||||
RW_MOUNT=/var/lib/stateless/writable
|
||||
# Label on local filesystem which can be used for temporary scratch space
|
||||
@@ -12,6 +12,6 @@ RW_OPTIONS=
|
||||
# Label for partition with persistent data
|
||||
STATE_LABEL=stateless-state
|
||||
# Where to mount to the persistent data
|
||||
-STATE_MOUNT=/var/lib/stateless/state
|
||||
+STATE_MOUNT=/security/state
|
||||
# Options to use for peristent mount
|
||||
STATE_OPTIONS=
|
||||
|
|
@ -6,10 +6,12 @@ Version: 8.76.2
|
|||
# ppp-watch is GPLv2+, everything else is GPLv2
|
||||
License: GPLv2 and GPLv2+
|
||||
Group: System Environment/Base
|
||||
Release: 1%{?dist}.4
|
||||
Release: 1%{?dist}.5
|
||||
Source: initscripts-%{version}.tar.bz2
|
||||
Patch0: olpc-initscripts.patch
|
||||
Patch1: olpc-autologin.patch
|
||||
Patch2: initscripts-8.76.2-readonly.patch
|
||||
Patch3: initscripts-8.76.2-prettyboot.patch
|
||||
BuildRoot: /%{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
Requires: mingetty, /bin/awk, /bin/sed, mktemp, e2fsprogs >= 1.15
|
||||
Requires: /sbin/sysctl, syslog
|
||||
|
|
@ -53,6 +55,8 @@ deactivate most network interfaces.
|
|||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1 -b .readonly
|
||||
%patch3 -p1 -b .prettyboot
|
||||
|
||||
%build
|
||||
make
|
||||
|
|
@ -242,6 +246,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%ghost %attr(0664,root,utmp) /var/run/utmp
|
||||
|
||||
%changelog
|
||||
* Thu Jun 26 2008 C. Scott Ananian <cscott@laptop.org> - 8.76.2-1.5
|
||||
- Turn on stateless support for OLPC; preserve /etc/ssh, /etc/sysconfig/i18n,
|
||||
/etc/timezone, /var/lib/dbus/machine-id, and /var/lib/random-seed.
|
||||
- Add better support for pretty boot: bring up localhost before rhgb-client
|
||||
is invoked; some additional calls to rhgb-client; make sure that we cleanly
|
||||
exit pretty boot if interactive boot mode is invoked.
|
||||
|
||||
* Fri Jun 13 2008 Dennis Gilmore <dennis@ausil.us> - 8.76.2-1.4
|
||||
- add patch to autologin
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue