]> Zhao Yanbai Git Server - minix.git/commitdiff
rs: Update recovery policies for sched and mfs. 13/3113/1
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Mon, 22 Dec 2014 02:34:01 +0000 (03:34 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 17 Sep 2015 13:34:59 +0000 (13:34 +0000)
Edited by David van Moolenbroek.

Change-Id: I7bbe543e2349dca3856a17abddc8366d1f19fe10

etc/rc
minix/servers/rs/table.c

diff --git a/etc/rc b/etc/rc
index 7ce6dbc4a87a00bc3d98102dcc20154c088f0217..5e3fe395b49943543d4bab1eab12d4274b8e47f3 100755 (executable)
--- a/etc/rc
+++ b/etc/rc
@@ -158,6 +158,13 @@ autoboot|start)
        edit memory
        edit pfs
        edit init
+       #
+       # Keep a copy around to recover the root FS from crashes
+       #
+       rootline=`cat /etc/mtab | grep "on / "`
+       rootfs=fs_`echo "$rootline" | cut -d' ' -f1 | cut -d'/' -f3`
+       roottype=`echo "$rootline" | cut -d' ' -f5`
+       service -c edit /service/$roottype -label $rootfs
     fi
 
     if [ "$sflag" ]
index d4c77a6aa59e9d2df81c646dceed7fd8ac25a98c..52cd40490a0c218cfa6fccffcc16c7be50e4c0ff 100644 (file)
@@ -34,6 +34,7 @@ struct boot_image_sys boot_image_sys_table[] = {
   { RS_PROC_NR,       SRVR_SF                           },
   { VM_PROC_NR,       VM_SF                             },
   { PM_PROC_NR,       SRVR_SF                           },
+  { SCHED_PROC_NR,    SRVR_SF                           },
   { VFS_PROC_NR,      SRVR_SF                           },
   { MFS_PROC_NR,      0                                 },
   { PFS_PROC_NR,      SRV_SF                            },