]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
util-linux: Create /etc/mtab symlink in scriptlet.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Oct 2011 11:58:51 +0000 (13:58 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Oct 2011 11:58:51 +0000 (13:58 +0200)
util-linux/util-linux.nm

index 4247cabca660b947ee6bf98763f829c7ca0fa7e8..36ab421cfb21566d0d9d7ae248c818689940370a 100644 (file)
@@ -6,7 +6,7 @@
 name       = util-linux
 version    = 2.19
 major_ver  = 2.19
-release    = 6
+release    = 7
 
 groups     = System/Base
 url        = http://kernel.org/~kzak/util-linux/
@@ -82,10 +82,6 @@ build
                        %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
                rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
 
-               # Create /etc/mtab symlink
-               mkdir -pv %{BUILDROOT}/etc
-               ln -svf /proc/mounts %{BUILDROOT}/etc/mtab
-
                # Set capabilities
                chmod -v -s %{BUILDROOT}/bin/mount
                setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/mount
@@ -94,13 +90,6 @@ build
        end
 end
 
-# This symlink is allowed to be absolute.
-quality-agent
-       whitelist_symlink
-               /etc/mtab
-       end
-end
-
 packages
        package %{name}
                groups += Base
@@ -109,14 +98,22 @@ packages
                        /etc/pam.d/system-auth
                end
 
-               filter_requires = /proc/.*/mounts
-
                obsoletes = util-linux-ng
 
                conflicts
                        setup<3.0-2
                        util-linux-ng
                end
+
+               preprequires += coreutils
+
+               script postin
+                       touch /var/log/lastlog
+
+                       # mtab symlink
+                       rm -f /etc/mtab
+                       ln -s /proc/mounts /etc/mtab
+               end
        end
 
        # Package information for libblkid