From bc04a05e4d92877501c67192afea8da1c8cd5d1e Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Fri, 3 Aug 2007 09:57:32 -0600 Subject: [PATCH] mount.preinst: deal with no /proc/mounts --- debian/changelog | 3 ++- debian/mount.preinst | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3c53faf4..b32fd531 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ util-linux (2.13~rc2-6) unstable-UNRELEASED; urgency=low * More fixes from upstream * swapoff: handle UUID= and LABEL=. Closes: #435555 + * mount.preinst: deal with no /proc/mounts. - -- LaMont Jones Thu, 2 Aug 2007 08:35:32 -0600 + -- LaMont Jones Fri, 3 Aug 2007 09:56:43 -0600 util-linux (2.13~rc2-5) unstable; urgency=low diff --git a/debian/mount.preinst b/debian/mount.preinst index adf41758..f9fb1f6d 100644 --- a/debian/mount.preinst +++ b/debian/mount.preinst @@ -19,7 +19,11 @@ case "$1" in version=$2 export LANG=C # for the comparison of mail version... - NFS_IN_USE=$(sed -n '/^[^ ]* [^ ]* nfs /p' /proc/mounts) + if [ -f /proc/mounts ]; then + NFS_IN_USE=$(sed -n '/^[^ ]* [^ ]* nfs /p' /proc/mounts) + else + NFS_IN_USE="" + fi if [ -n "$NFS_IN_USE" ] && [ ! -x /sbin/mount.nfs ] ; then cat << EOF You have NFS mount points currently mounted, and this version of mount -- 2.39.5