[debian-edu-commits] debian-edu/ 01/01: debian-edu-fsautoresize: Always use mapper names instead of kernel names when detecting supported mount points. (Closes: #800651). Thanks to Wolfgang Schweer and Giorgio Pioda.
Mike Gabriel
sunweaver at debian.org
Wed Oct 14 07:49:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch jessie
in repository debian-edu-config.
commit d5d7aa59d57646697b265bef9d102584fc05ba7e
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Oct 14 09:47:17 2015 +0200
debian-edu-fsautoresize: Always use mapper names instead of kernel names when detecting supported mount points. (Closes: #800651). Thanks to Wolfgang Schweer and Giorgio Pioda.
Conflicts (resolved by Mike Gabriel):
debian/changelog
---
debian/changelog | 5 ++++-
sbin/debian-edu-fsautoresize | 8 ++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 1df0f88..f6f7912 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,8 +8,11 @@ debian-edu-config (1.818+deb8u1) UNRELEASED; urgency=low
[ Mike Gabriel ]
* Add quotes around DNs when evoking kadmin.local in gosa-create and
gosa-create-host. (Closes: #792042).
+ * debian-edu-fsautoresize: Always use mapper names instead of kernel names
+ when detecting supported mount points. (Closes: #800651). Thanks
+ to Wolfgang Schweer and Giorgio Pioda.
- -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Wed, 15 Jul 2015 14:25:32 +0200
+ -- Petter Reinholdtsen <pere at debian.org> Sat, 16 May 2015 23:12:06 +0200
debian-edu-config (1.818) unstable; urgency=high
diff --git a/sbin/debian-edu-fsautoresize b/sbin/debian-edu-fsautoresize
index debfc0d..64c7b21 100644
--- a/sbin/debian-edu-fsautoresize
+++ b/sbin/debian-edu-fsautoresize
@@ -14,6 +14,7 @@ use warnings;
use Getopt::Std;
use Sys::Syslog qw(openlog syslog closelog LOG_NOTICE);
+use File::Basename;
# Using this module (instead of Filesys::DiskSpace) to get a version
# providing the device size, and not only free and used.
@@ -194,6 +195,13 @@ sub supported_mountpoints {
chomp;
my @f = split(/\s+/);
my $device = $f[0];
+ # Always use mapper names instead of kernel ones.
+ if (index ($f[0], "/dev/dm-") != -1) {
+ for my $mapdevice (glob "/dev/mapper/*") {
+ my $dmdevice = basename(readlink $mapdevice) if -l $mapdevice;
+ $device = $mapdevice if defined($dmdevice) && $dmdevice =~ basename($f[0]);
+ }
+ }
my $mountpoint = $f[1];
my $typename = $f[2];
next unless (exists $fsops{$typename});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list