FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-23-2009, 07:40 PM
Chris Lumens
 
Default Have linuxrc.s390 callable as "reboot" or "shutdown", just like init.

---
loader/linuxrc.s390 | 18 +++++++++---------
scripts/mk-images | 8 ++++----
2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index a3ee665..26dc90f 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -92,8 +92,8 @@ function checkipv4()

function doshutdown()
{
- echo $"about to exec shutdown"
- exec /sbin/shutdown
+ echo $"about to exec halt"
+ exec /sbin/halt
exit 0
}

@@ -109,8 +109,8 @@ function doreboot()
popd >/dev/null 2>&1
fi

- echo $"about to exec shutdown -r"
- exec /sbin/shutdown -r
+ echo $"about to exec reboot"
+ exec /sbin/reboot
exit 0
}

@@ -2702,6 +2702,11 @@ function final_check() {

### MAIN ###

+case "${0/.*//}" in
+ "reboot") doreboot ;;
+ "shutdown") doshutdown ;;
+esac
+
init_main
udev_setup

@@ -3054,11 +3059,6 @@ EOF

echo -n $$ > /var/run/init.pid

- # shutdown (halt) on SIGUSR1
- trap doshutdown SIGUSR1
- # reboot on SIGUSR2
- trap doreboot SIGUSR2
-
startinetd

if [ -n "$RUNKS" ]; then
diff --git a/scripts/mk-images b/scripts/mk-images
index aefc5b0..475f904 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -634,17 +634,17 @@ makeinitrd() {
instbin $IMGPATH ${LOADERBINDIR##$IMGPATH}/$LOADERBIN $MBD_DIR /sbin/loader
if [ "$BUILDARCH" != "s390" -a "$BUILDARCH" != "s390x" ]; then
instbin $IMGPATH ${LOADERBINDIR##$IMGPATH}/init $MBD_DIR /sbin/init
- ln -s ./init $MBD_DIR/sbin/reboot
- ln -s ./init $MBD_DIR/sbin/halt
- ln -s ./init $MBD_DIR/sbin/poweroff
else
- instbin $IMGPATH ${LOADERBINDIR##$IMGPATH}/shutdown $MBD_DIR /sbin/shutdown
instbin $IMGPATH /usr/lib/anaconda-runtime/loader/linuxrc.s390 $MBD_DIR /sbin/init
instbin $IMGPATH /usr/lib/anaconda-runtime/loader/lsznet.raw $MBD_DIR /sbin/lsznet
instbin $IMGPATH /usr/lib/anaconda-runtime/loader/controlunits.sh $MBD_DIR /sbin/controlunits
instbin $IMGPATH /usr/sbin/dasdfmt $MBD_DIR /sbin/dasdfmt
fi

+ ln -s ./init $MBD_DIR/sbin/reboot
+ ln -s ./init $MBD_DIR/sbin/halt
+ ln -s ./init $MBD_DIR/sbin/poweroff
+
if [ "$BUILDARCH" != "s390" -a "$BUILDARCH" != "s390x" ]; then
install -m 644 $KEYMAPS $MBD_DIR/etc/keymaps.gz
install -m 644 $SCREENFONT $MBD_DIR/etc/screenfont.gz
--
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org