On 04/14/2010 07:02 PM, David Cantrell wrote: > Necessary for reboot or halt support from rescue mode. Since > linuxrc.s390 currently does everything on s390x, add in handlers for > reboot and halt modes. > --- > loader/linuxrc.s390 | 6 ++++++ > scripts/mk-images | 4 ++++ > 2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390 > index ccef4d4..814dd32 100644 > --- a/loader/linuxrc.s390 > +++ b/loader/linuxrc.s390 > @@ -41,6 +41,12 @@ > > # debug: set -x > > +if [ "${0##*/}" = "reboot" ]; then > + kill -USR2 1 > +elif [ "${0##*/}" = "halt" ]; then > + kill -USR1 1 > +fi > + > VERSION=1.2 > > export TEXTDOMAIN=s390installer > diff --git a/scripts/mk-images b/scripts/mk-images > index 9e5a94d..67c6bff 100755 > --- a/scripts/mk-images > +++ b/scripts/mk-images > @@ -660,6 +660,10 @@ makeinitrd() { > else > instbin $IMGPATH ${LOADERBINDIR##$IMGPATH}/shutdown $MBD_DIR /sbin/shutdown > instbin $IMGPATH /usr/lib/anaconda-runtime/loader/linuxrc.s390 $MBD_DIR /sbin/init > + ( cd $MBD_DIR/sbin > + ln -sf linuxrc.s390 reboot > + ln -sf linuxrc.s390 halt > + ) > instbin $IMGPATH /usr/sbin/dasdfmt $MBD_DIR /sbin/dasdfmt > cp -a $IMGPATH/usr/sbin/*_cio_free $MBD_DIR/sbin > fi Now that linuxrc.s390 behaves like the "real" init with respect to reboot and halt, we should take the change to consolidate and remove the special handling for s390 in mk-images. I'm thinking of something like the following: if [ "$BUILDARCH" != "s390" -a "$BUILDARCH" != "s390x" ]; then instbin $IMGPATH ${LOADERBINDIR##$IMGPATH}/init $MBD_DIR /sbin/init 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/sbin/dasdfmt $MBD_DIR /sbin/dasdfmt fi ln -s ./init $MBD_DIR/sbin/reboot ln -s ./init $MBD_DIR/sbin/halt Even poweroff could be fixed by adding an argc[0] handler in linuxrc plus a new signal handler to finally exec shutdown -P. But that's not required to fix the bug and we can do that sometime later. I guess the symlinks in your patch also missed some absolute paths for the target to end up within the new initrd tree. Steffen Linux on System z Development IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list