<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans Mono'; font-size:9pt; font-weight:400; font-style:normal;">&gt; Does checkroot.sh need to change at all with respect to what it does to<br>
&gt; /etc/mtab?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>For example, something like the following, which checks /etc/mtab is a symlink<br>
on Linux and attempts to create one to /proc/mounts if the conditions are<br>
correct. Just in case initscripts postinst maintainer scripts cannot create<br>
the symlink, because possibly the package was upgraded/installed offline and<br>
/proc was not mounted.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Also clear out devfs stuff, which is afaik no longer supported.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Kel.<br>
---<br>
--- a/debian/initscripts/etc/init.d/checkroot.sh                                                <br>
+++ b/debian/initscripts/etc/init.d/checkroot.sh                                                <br>
@@ -39,7 +39,6 @@ do_start () {                                                                 <br>
        #       device node,                                                                    <br>
        # 2) Swap that is on a md device or a file that may be on a md                          <br>
        #       device,                                                                         <br>
-       # 3) The mount parameters for a devfs filesystem.                                       <br>
        #                                                                                       <br>
                                                                                                <br>
        exec 9&lt;&amp;0 &lt;/etc/fstab                                                                   <br>
@@ -52,7 +51,6 @@ do_start () {                                                                 <br>
        rootcheck=no                                                                            <br>
        swap_on_lv=no                                                                           <br>
        swap_on_file=no                                                                         <br>
-       devfs=                                                                                  <br>
                                                                                                <br>
        while read DEV MTPT FSTYPE OPTS DUMP PASS JUNK                                          <br>
        do                                                                                      <br>
@@ -75,11 +73,6 @@ do_start () {                                                                <br>
                        [ "$FSTYPE" = "swap" ] &amp;&amp; swap_on_file=yes                              <br>
                        ;;                                                                      <br>
                  *)                                                                            <br>
-                       # Devfs definition ?                                                    <br>
-                       if [ "$FSTYPE" = "devfs" ] &amp;&amp; [ "$MTPT" = "/dev" ] &amp;&amp; mountpoint -q /dev<br>
-                       then                                                                    <br>
-                               devfs="-t $FSTYPE $DEV $MTPT"                                   <br>
-                       fi                                                                      <br>
                        ;;                                                                      <br>
                esac                                                                            <br>
                [ "$MTPT" != "/" ] &amp;&amp; continue                                                  <br>
@@ -339,42 +332,17 @@ but requested that the system be restart                                  <br>
        fi                                                                                      <br>
                                                                                                <br>
        #                                                                                       <br>
-       # We only create/modify /etc/mtab if the location where it is                           <br>
-       # stored is writable. If /etc/mtab is a symlink into /proc/                             <br>
-       # then it is not writable.                                                              <br>
-       #                                                                                       <br>
-       INIT_MTAB_FILE=no                                                                       <br>
-       MTAB_PATH="$(readlink -f /etc/mtab || :)"                                               <br>
-       case "$MTAB_PATH" in                                                                    <br>
-         /proc/*)                                                                              <br>
-               ;;                                                                              <br>
-         /*)                                                                                   <br>
-               if touch "$MTAB_PATH" &gt;/dev/null 2&gt;&amp;1                                           <br>
-               then                                                                            <br>
-                       :&gt; "$MTAB_PATH"                                                         <br>
-                       rm -f ${MTAB_PATH}~<br>
-                       INIT_MTAB_FILE=yes<br>
-               fi<br>
-               ;;<br>
-         "")<br>
-               [ -L /etc/mtab ] &amp;&amp; MTAB_PATH="$(readlink /etc/mtab)"<br>
-               if [ "$MTAB_PATH" ]<br>
+       # If /etc/mtab is not a symlink, attempt to symlink it to /proc/mounts<br>
+       # on Linux. See #494001<br>
+       #<br>
+       if [ Linux = "$KERNEL" ] &amp;&amp; [ ! -L /etc/mtab ] &amp;&amp; [ -f /proc/mounts ]<br>
+       then<br>
+               if touch /etc/mtab &gt;/dev/null 2&gt;&amp;1<br>
                then<br>
-                       log_failure_msg "Cannot initialize ${MTAB_PATH}."<br>
+                       rm -f /etc/mtab &amp;&amp; ln -s /proc/mounts /etc/mtab<br>
                else<br>
-                       log_failure_msg "Cannot initialize /etc/mtab."<br>
+                       log_warning_msg "cannot symlink /etc/mtab to /proc/mounts"<br>
                fi<br>
-               ;;<br>
-         *)<br>
-               log_failure_msg "Illegal mtab location '${MTAB_PATH}'."<br>
-               ;;<br>
-       esac<br>
-<br>
-       if [ "$INIT_MTAB_FILE" = yes ]<br>
-       then<br>
-               [ "$roottype" != none ] &amp;&amp;<br>
-                       mount -f -o $rootopts -t $roottype $fstabroot /<br>
-               [ "$devfs" ] &amp;&amp; mount -f $devfs<br>
        fi<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>        #<br>
---</p></body></html>