Package: dirvish
Version: 1.2.1-1.1
Severity: normal
Tags: patch
mount_check() checks for the presence of /lost+found in a mount point in order
to find out whether the mount succeeded. Instead, one should check the return
value of the mount command. If it is not equal to zero, the mount failed.
Otherwise, it must have succeeded.
Maybe, even the second check could be left out:
if stat $1 | grep 'Inode: 2[^0-9]' >/dev/null; then # ditto
This bug occurred on Ubuntu 10.04.
-- System Information:
Debian Release: squeeze/sid
APT prefers lucid-updates
APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500,
'lucid-backports'), (500, 'lucid')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-22-generic (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages dirvish depends on:
ii libtime-modules-perl 2006.0814-2 Various Perl modules for time/date
ii libtime-period-perl 1.20-8 Perl library for testing if a time
ii perl 5.10.1-8ubuntu2 Larry Wall's Practical Extraction
ii perl-modules 5.10.1-8ubuntu2 Core Perl modules
ii rsync 3.0.7-1ubuntu1 fast remote file copy program (lik
Versions of packages dirvish recommends:
ii ssh 1:5.3p1-3ubuntu3 secure shell client and server (me
dirvish suggests no packages.
-- no debconf information
11,12c11
< if [ ! -d $1/lost+found ]; then # only works for "real" filesystems :-)
< # (Yes, I know about reiserfs.)
---
> if [ $? -ne 0 ]; then # fail
35c34
< # mount_check /backup
---
> mount_check /mnt/backup
40c39
< # umount /backup || rc=$?
---
> # umount /mnt/backup || rc=$?