<!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;">> Does checkroot.sh need to change at all with respect to what it does to<br>
> /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<&0 </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" ] && swap_on_file=yes <br>
;; <br>
*) <br>
- # Devfs definition ? <br>
- if [ "$FSTYPE" = "devfs" ] && [ "$MTPT" = "/dev" ] && mountpoint -q /dev<br>
- then <br>
- devfs="-t $FSTYPE $DEV $MTPT" <br>
- fi <br>
;; <br>
esac <br>
[ "$MTPT" != "/" ] && 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" >/dev/null 2>&1 <br>
- then <br>
- :> "$MTAB_PATH" <br>
- rm -f ${MTAB_PATH}~<br>
- INIT_MTAB_FILE=yes<br>
- fi<br>
- ;;<br>
- "")<br>
- [ -L /etc/mtab ] && 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" ] && [ ! -L /etc/mtab ] && [ -f /proc/mounts ]<br>
+ then<br>
+ if touch /etc/mtab >/dev/null 2>&1<br>
then<br>
- log_failure_msg "Cannot initialize ${MTAB_PATH}."<br>
+ rm -f /etc/mtab && 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 ] &&<br>
- mount -f -o $rootopts -t $roottype $fstabroot /<br>
- [ "$devfs" ] && 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>