[meego-commits] 6092: Changes to Trunk:Testing/fastinit

Auke Kok auke-jan.h.kok at intel.com
Thu Jul 29 17:07:03 UTC 2010


Hi,
I have made the following changes to fastinit in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Auke Kok

[This message was auto-generated]

---

Request #6092:

  submit:   home:auke:branches:Trunk:Testing/fastinit(r2)(cleanup) -> Trunk:Testing/fastinit


Message:
    Resubmitting fastinit-1.25 merge/polish

State:   new          2010-07-29T05:00:03 auke
Comment: None



changes files:
--------------
--- fastinit.changes
+++ fastinit.changes
@@ -0,0 +1,5 @@
+* Wed Jul 28 2010 Auke Kok <auke-jan.h.kok at intel.com> - 1.25
+- fold Trunk patches into upstream repo
+- fix core location to /tmp/core
+- remove tcp syncookie setting
+

old:
----
  fastinit-1.24-delay-launching.patch
  fastinit-1.24-fastshutdown.patch
  fastinit-1.24-meego.patch
  fastinit-1.24-rc-sysinit.patch
  fastinit-1.24-restore-randomseed.patch
  fastinit-1.24.tar.bz2

new:
----
  fastinit-1.25.tar.bz2

spec files:
-----------
--- fastinit.spec
+++ fastinit.spec
@@ -1,10 +1,10 @@
 Summary: The inittab file and the /etc/init.d scripts
 Name: fastinit
-Version: 1.24
+Version: 1.25
 License: GPLv2
 Group: System/Base
 Release: 1
-Source: http://git.moblin.org/cgit.cgi/fastinit/snapshot/fastinit-%{version}.tar.bz2
+Source: %{name}-%{version}.tar.bz2
 BuildRoot: /%{_tmppath}/%{name}-%{version}-%{release}-root
 Requires: mingetty, /bin/awk, /bin/sed, /bin/mktemp, e2fsprogs >= 1.15
 Requires: /sbin/sysctl, syslog
@@ -23,27 +23,16 @@
 Requires: libblkid
 BuildRequires: pkgconfig(glib-2.0)
 
-Patch0: fastinit-1.24-meego.patch
-Patch1: fastinit-1.24-rc-sysinit.patch
-Patch2: fastinit-1.24-fastshutdown.patch
-Patch3: fastinit-1.24-restore-randomseed.patch
-Patch4: fastinit-1.24-delay-launching.patch
-
 Requires(pre): /sbin/chkconfig, /usr/sbin/groupadd, /bin/sed, /bin/cp
 
 %description
 The fastinit package contains the basic system scripts used to boot
-your moblin system, change runlevels, and shut the system down cleanly.
+your MeeGo system, change runlevels, and shut the system down cleanly.
 Fastinit also contains the scripts that activate and deactivate most
 network interfaces.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
 
 %build
 make -C src 
@@ -55,7 +44,6 @@
 mv -f $RPM_BUILD_ROOT/etc/inittab.sysv $RPM_BUILD_ROOT/etc/inittab
 rm -f $RPM_BUILD_ROOT/etc/inittab.*
 mkdir -p $RPM_BUILD_ROOT/var/spool/gdm
-mv $RPM_BUILD_ROOT/usr/sbin/moblin-dm $RPM_BUILD_ROOT/usr/sbin/meego-dm
 
 %pre
 /usr/sbin/groupadd -g 22 -r -f utmp

other changes:
--------------

++++++ fastinit-1.24.tar.bz2 -> fastinit-1.25.tar.bz2
--- .gitignore
+++ .gitignore
+*~
--- Makefile
+++ Makefile
@@ -1,4 +1,4 @@
-VERSION = 1.24
+VERSION = 1.25
 
 ROOT ?= /
 SUPERUSER = root
@@ -15,7 +15,7 @@
 	install -m644 inittab $(ROOT)/etc/inittab.sysv
 	install -m755 service $(ROOT)/sbin
 	install -m755 boot-and-install $(ROOT)/sbin
-	install -m755 moblin-dm $(ROOT)/usr/sbin
+	install -m755 meego-dm $(ROOT)/usr/sbin
 	install -d $(ROOT)$(mandir)/man8
 	install -m644 service.8 $(ROOT)$(mandir)/man8
 	install -m644 sysctl.conf $(ROOT)/etc/sysctl.conf
--- inittab
+++ inittab
@@ -46,5 +46,5 @@
 x1:4:once:/sbin/boot-and-install
 
 # Run X in runlevel 5
-x:5:respawn:/usr/sbin/moblin-dm
+x:5:respawn:/usr/sbin/meego-dm
 
--- meego-dm
+++ meego-dm
(renamed from moblin-dm)
--- moblin-dm
+++ moblin-dm
(renamed to meego-dm)
--- rc.d/init.d/halt
+++ rc.d/init.d/halt
@@ -6,40 +6,21 @@
 #
 # Author:       Miquel van Smoorenburg, <miquels at drinkel.nl.mugnet.org>
 #               Modified for RHS Linux by Damien Neil
+#               Modified for Moblin and MeeGo by Auke Kok
 #
 
 NOLOCALE=1
 . /etc/init.d/functions
 
+# Write to wtmp file before unmounting /var
+/sbin/halt -w
+
+# start syncing dirty data to disk early  
+/usr/bin/ionice -t -c 3 -n 7 sync &
+
 UMOUNT="umount"
 [ ! -w /etc ] && UMOUNT="umount -n"
 
-action() {
-   echo -n "$1 "
-   shift
-   if [ "$BOOTUP" = "color" ]; then
-      "$@" && echo_success || echo_failure
-   else
-      "$@"
-   fi
-   echo
-}
-
-halt_crypto() {
-    fnval=0
-    while read dst src key; do
-	[ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue
-        if [ -b "/dev/mapper/$dst" ]; then
-            if /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then
-                action $"Stopping disk encryption for $dst" /sbin/cryptsetup remove "$dst"
-            else
-                fnval=1
-            fi
-        fi
-    done < /etc/crypttab
-    return $fnval
-}
-
 # See how we were called.
 case "$0" in
    *halt)
@@ -72,9 +53,9 @@
 # Kill all processes.
 [ "${BASH+bash}" = bash ] && enable kill
 
-action $"Sending all processes the TERM signal..." /sbin/killall5 -15
-sleep 2
-action $"Sending all processes the KILL signal..."  /sbin/killall5 -9
+/sbin/killall5 -15
+sleep 1
+/sbin/killall5 -9
 
 # Remove stale backups
 rm -f /etc/mtab~ /etc/mtab~~
@@ -89,28 +70,23 @@
 rm -f /var/lib/rpm/__db* &> /dev/null
 rm -f /var/gdm/.gdmfifo &> /dev/null
 
-# Write to wtmp file before unmounting /var
-/sbin/halt -w
+# remove the crash indicator flag
+rm -f /.autofsck
 
 # Save mixer settings, here for lack of a better place.
 if [ -s /etc/alsa/alsactl.conf -a -x /sbin/alsactl ]; then
-  action $"Saving mixer settings" /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --ignore store
+	/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --ignore store
 fi
 
 # Save random seed
 touch /var/lib/random-seed
 chmod 600 /var/lib/random-seed
-action $"Saving random seed: " dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 2>/dev/null
-
-# Try to unmount tmpfs filesystems to avoid swapping them in.  Ignore failures.
-tmpfs=$(awk '$2 ~ /^\/($|proc|dev)/ { next; }
-	     $3 == "tmpfs" { print $2; }' /proc/mounts | sort -r)
-[ -n "$tmpfs" ] && fstab-decode $UMOUNT $tmpfs 2>/dev/null
+/bin/dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 2>/dev/null
 
 # Turn off swap, then unmount file systems.
 [ -f /proc/swaps ] && SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`
 if [ -n "$SWAPS" ]; then
-    action $"Turning off swap: " swapoff $SWAPS
+    /sbin/swapoff $SWAPS
     for dst in $SWAPS; do
 	if [[ "$dst" =~ ^/dev/mapper ]] \
 	    && [ "$(dmsetup status "$dst" | cut -d ' ' -f 3)" = crypt ]; then
@@ -121,8 +97,6 @@
     done
 fi
 
-[ -x /sbin/quotaoff ] && action $"Turning off quotas: " /sbin/quotaoff -aug
-
 # Unmount file systems, killing processes if we have to.
 # Unmount loopback stuff first
 __umount_loopback_loop
@@ -142,13 +116,6 @@
 	$"Unmounting file systems (retry): " \
 	-f
 
-[ -f /proc/bus/usb/devices ] && $UMOUNT /proc/bus/usb
-
-[ -f /etc/crypttab ] && halt_crypto
-
-# remove the crash indicator flag
-rm -f /.autofsck
-
 # Try all file systems other than root, essential filesystems and RAM disks,
 # one last time.
 awk '$2 !~ /\/(|dev|proc|selinux|sys)$/ && $1 !~ /^\/dev\/ram/ { print $2 }' \
@@ -175,17 +142,6 @@
  echo $"On the next boot fsck will be forced."
 fi
 
-# Shutdown UPS drivers
-if [ "$command" = /sbin/halt -a -f /etc/sysconfig/ups ]; then
-	. /etc/sysconfig/ups
-	if [ -z $POWERDOWNFLAG ]; then
-		POWERDOWNFLAG=/etc/killpower
-	fi
-	if [ "$SERVER" = "yes" -a -f $POWERDOWNFLAG ]; then
-		/sbin/upsdrvctl shutdown
-	fi
-fi
-
 # First, try kexec. If that fails, fall back to rebooting the old way.
 [ -n "$kexec_command" ] && $kexec_command -e -x >& /dev/null
 
--- rc.d/rc.sysinit
+++ rc.d/rc.sysinit
@@ -5,13 +5,14 @@
 # Taken in part from Miquel van Smoorenburg's bcheckrc.
 #
 
-# start readahead before anything else
-[ -x /sbin/sreadahead ] && /sbin/sreadahead >/dev/null 2>&1
-
 if [ ! -e /proc/mounts ]; then 
 	mount -n -t proc /proc /proc
 	mount -n -t sysfs /sys /sys >/dev/null 2>&1
 fi
+
+# start readahead before anything else
+[ -x /sbin/sreadahead ] && /sbin/sreadahead >/dev/null 2>&1
+
 . /etc/init.d/functions
 
 cmdline=$(cat /proc/cmdline)
@@ -22,10 +23,12 @@
 	nosplash="yes"
 fi
 
-echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink
+if [ -e /sys/devices/virtual/graphics/fbcon/cursor_blink ]; then
+    echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink
+fi
 
 if [ -z "$nosplash" ]; then
-    /usr/bin/chvt 2
+    [ -x /usr/bin/chvt ] && /usr/bin/chvt 2
     [ -x /usr/bin/ply-image ] && /usr/bin/ply-image
 fi
 
@@ -52,7 +55,7 @@
 	# Print a text banner.
 	echo -en $"\t\tWelcome to "
 	[ "$BOOTUP" = "color" ] && echo -en "\\033[0;34m"
-	echo -en "Moblin"
+	echo -en "MeeGo"
 	[ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
 	echo 
 fi
@@ -131,8 +134,8 @@
 	
         # A return of 4 or higher means there were serious problems.
 	if [ $rc -gt 1 ]; then
-		# have to switch to the console!
-		chvt 1
+		# have to switch to the console!  
+		[ -x /usr/bin/chvt ] && /usr/bin/chvt 1
 
 		failure "$STRING"
 		echo
@@ -245,7 +248,7 @@
 	# now we can start hal (yes, this is a hal/dbus bug)
 	test -x /usr/sbin/hald && nice -n 20 hald --daemon=yes
 
-	connmand
+	[ -x /usr/sbin/connmand ] && /usr/sbin/connmand
 
 	# when we're gathering readahead data, we want the background
 	# startup to be later so that it ends up delayed in the
@@ -287,11 +290,17 @@
 	fi
 
 	# udevd -d
-	
 
 	rm -f /dev/.in_sysinit
-	
-	
+
+	# restore saved random seed
+	if [ -f "/var/lib/random-seed" ]; then
+		cat /var/lib/random-seed > /dev/urandom
+	else
+		touch /var/lib/random-seed
+		chmod 600 /var/lib/random-seed
+	fi
+
 	# Start up swapping for swap devices listed in /etc/fstab
 	swapon -a -e
  
--- sysctl.conf
+++ sysctl.conf
@@ -18,10 +18,7 @@
 # Controls whether core dumps will append the PID to the core filename.
 # Useful for debugging multi-threaded applications.
 kernel.core_uses_pid = 1
-kernel.core_pattern = '/tmp/core'
-
-# Controls the use of TCP syncookies
-net.ipv4.tcp_syncookies = 1
+kernel.core_pattern = /tmp/core
 
 # delay writeback time
 vm.dirty_writeback_centisecs = 1500

++++++ deleted files:
--- fastinit-1.24-delay-launching.patch
--- fastinit-1.24-fastshutdown.patch
--- fastinit-1.24-meego.patch
--- fastinit-1.24-rc-sysinit.patch
--- fastinit-1.24-restore-randomseed.patch



More information about the MeeGo-commits mailing list