Commit 3cd751f6 authored by Xuetian Weng's avatar Xuetian Weng
Browse files

/bin and /sbin move

parent 852c7c4d
......@@ -3,17 +3,17 @@
# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
pkgname=audit
pkgver=2.3.1
pkgver=2.3.7
pkgrel=1
pkgdesc='User space utilities for storing and searching the audit records generated by the audit subsystem in the Linux kernel.'
url="http://people.redhat.com/sgrubb/$pkgname"
url="http://people.redhat.com/sgrubb/audit"
arch=('x86_64')
depends=('krb5' 'libcap')
makedepends=('libldap' 'linux-headers' 'python2' 'swig')
license=(GPL)
options=(!libtool)
options=(!libtool staticlibs)
backup=(etc/libaudit.conf
etc/audit/audit.rules
etc/audit/rules.d/audit.rules
etc/audit/auditd.conf
etc/audisp/audispd.conf
etc/audisp/audisp-remote.conf
......@@ -23,7 +23,7 @@ backup=(etc/libaudit.conf
etc/audisp/plugins.d/au-remote.conf
etc/audisp/plugins.d/syslog.conf)
source=("$url/$pkgname-$pkgver.tar.gz")
md5sums=('82c2c4b1052d7c1e948deafa0d5077fe')
md5sums=('42813b6c202f5922ac904c059ac17ee6')
build() {
cd $srcdir/$pkgname-$pkgver
......@@ -31,10 +31,11 @@ build() {
#--with-libcap-ng=no
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--libexecdir=/usr/lib/audit \
--with-python=yes \
--enable-gssapi-krb5=yes \
--libexecdir=/usr/lib/audit \
--with-apparmor \
--enable-gssapi-krb5=yes \
--enable-systemd
......@@ -42,13 +43,15 @@ build() {
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
cd $pkgdir
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
cd "$pkgdir"
install -d var/log/audit
rm -rf \
etc/rc.d/init.d \
etc/sysconfig
mv usr/sbin sbin
rm -rf etc/rc.d etc/sysconfig
sed -ri 's|/sbin|/usr/bin|' \
etc/audit/*.conf \
etc/audisp/plugins.d/*.conf \
usr/lib/systemd/system/auditd.service
}
......@@ -2,7 +2,7 @@
pkgname=dosfstools
pkgver=3.0.26
pkgrel=1
pkgrel=2
pkgdesc="DOS filesystem utilities."
arch=('x86_64')
depends=('glibc')
......@@ -12,11 +12,11 @@ source=("http://www.daniel-baumann.ch/files/software/dosfstools/${pkgname}-${pkg
md5sums=('45012f5f56f2aae3afcd62120b9e5a08')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
cd "${pkgname}-${pkgver}"
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR=$pkgdir SBINDIR=/sbin MANDIR=/usr/share/man DOCDIR=/usr/share/doc install
cd "${pkgname}-${pkgver}"
make DESTDIR=$pkgdir PREFIX=/usr SBINDIR=/usr/bin MANDIR=/usr/share/man DOCDIR=/usr/share/doc install
}
......@@ -4,21 +4,27 @@
pkgname=e4rat
pkgver=0.2.3
pkgrel=1
pkgrel=2
pkgdesc="Toolset to accelerate the boot process and application startups for systems with ext4 root partitions."
arch=('i686' 'x86_64')
url="http://e4rat.sourceforge.net/"
license=('GPL')
depends=('e2fsprogs' 'util-linux')
depends=('e2fsprogs' 'boost-libs')
makedepends=('audit' 'boost' 'cmake')
options=(!strip)
backup=(etc/e4rat.conf)
source=(http://downloads.sourceforge.net/project/$pkgname/$pkgver/e4rat_${pkgver}_src.tar.gz)
md5sums=('e8e7db69018036f11d509b65c32d3ea4')
source=( "http://downloads.sourceforge.net/project/$pkgname/$pkgver/e4rat_${pkgver}_src.tar.gz" \
'boost-fs3-v2.patch' )
prepare () {
cd "$srcdir/$pkgname-$pkgver"
patch -p1 < "$srcdir/boost-fs3-v2.patch"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
unset LDFLAGS
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_CORE_LIBRARY_STATIC=true .
make
}
......@@ -28,4 +34,7 @@ package() {
make DESTDIR="$pkgdir" install
install -dm755 "$pkgdir/var/lib/$pkgname"
}
\ No newline at end of file
}
sha256sums=('f6feda9618eff0f9442baf771b4776b634e5a2f39e678c10e4c7946b2c6a96a0'
'9a9786d6167e4a47d1733735745b0eadeabf487886405df9e6771a28f3a20965')
diff -rupN e4rat-0.2.3-fresh/CMakeLists.txt e4rat-0.2.3-fixed/CMakeLists.txt
--- e4rat-0.2.3-fresh/CMakeLists.txt 2012-05-03 08:43:12.000000000 +0200
+++ e4rat-0.2.3-fixed/CMakeLists.txt 2013-06-03 16:36:45.582255709 +0200
@@ -14,9 +14,8 @@ IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_D
set(CMAKE_INSTALL_PREFIX "/" CACHE PATH "e4rat install prefix" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-set(Boost_USE_STATIC_LIBS ON)
+set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED OFF)
-add_definitions(-DBOOST_FILESYSTEM_VERSION=2)
find_package(Boost 1.41 COMPONENTS system filesystem regex REQUIRED)
set(${PROJECT_NAME}_LIBRARIES ${${PROJECT_NAME}_LIBRARIES}
${Boost_LIBRARIES})
@@ -27,56 +26,6 @@ add_subdirectory( ${CMAKE_CURRENT_SOUR
# to generate debian package run: make package
-FIND_PROGRAM(DPKG_CMD dpkg)
-if(DPKG_CMD)
- EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
- OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-else(DPKG_CMD)
- MESSAGE(STATUS "CPACK: Can not find dpkg in your path, default to i386.")
- SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
-endif(DPKG_CMD)
-
-SET (CPACK_GENERATOR DEB)
-SET(CPACK_PACKAGE_VERSION ${E4RAT_VERSION})
-SET(CPACK_PACKAGE_FILE_NAME
- "${PROJECT_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
-
-IF(NOT CMAKE_BUILD_TYPE STREQUAL "release")
- SET(CPACK_PACKAGE_FILE_NAME
- ${CPACK_PACKAGE_FILE_NAME}_debug)
-endif(NOT CMAKE_BUILD_TYPE STREQUAL "release")
-
-SET (CPACK_INSTALL_PREFIX "/")
-
-if(NOT CPACK_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX)
-SET(CPACK_PACKAGE_FILE_NAME
- ${CPACK_PACKAGE_FILE_NAME}_invalid-prefix)
-endif(NOT CPACK_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX)
-
-SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY
- "Reduce disk access time on ext4 filesystems through relevant file defragmentation.")
-SET (CPACK_PACKAGE_CONTACT "Andreas Rid <conso@users.sf.net>")
-SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
-SET (CPACK_DEBIAN_PACKAGE_SECTION "extra")
-SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Rid")
-set (CPACK_SET_DESTDIR "ON") # Necessary because of the absolute install paths
-
-# extra install and uninstall create subfolders
-# I don't know why cpack deb does not create or remove directories.
-set( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
- "${CMAKE_CURRENT_SOURCE_DIR}/debian/preinst"
- "${CMAKE_CURRENT_SOURCE_DIR}/debian/postrm")
-
-SET (CPACK_DEBIAN_PACKAGE_DEPENDS
- "e2fslibs (>=1.41)")
-
-SET (CPACK_DEBIAN_PACKAGE_CONFLICTS
- "auditd, ureadahead")
-
-INCLUDE(CPack)
-
add_custom_target(src
COMMAND test -e ${PROJECT_NAME}-${E4RAT_VERSION} || mkdir ${PROJECT_NAME}-${E4RAT_VERSION}
COMMAND rsync -p --relative `git ls-files` ${PROJECT_NAME}-${E4RAT_VERSION}
diff -rupN e4rat-0.2.3-fresh/src/CMakeLists.txt e4rat-0.2.3-fixed/src/CMakeLists.txt
--- e4rat-0.2.3-fresh/src/CMakeLists.txt 2012-05-03 08:43:12.000000000 +0200
+++ e4rat-0.2.3-fixed/src/CMakeLists.txt 2013-06-03 16:42:44.028413549 +0200
@@ -180,7 +180,7 @@ if(NOT BUILD_CORE_LIBRARY_STATIC)
endif(NOT BUILD_CORE_LIBRARY_STATIC)
INSTALL(TARGETS ${${PROJECT_NAME}_TARGETS}
- RUNTIME DESTINATION "sbin"
+ RUNTIME DESTINATION "/usr/bin"
LIBRARY DESTINATION "lib"
ARCHIVE DESTINATION "lib"
)
diff -rupN e4rat-0.2.3-fresh/src/common.cc e4rat-0.2.3-fixed/src/common.cc
--- e4rat-0.2.3-fresh/src/common.cc 2012-05-03 08:43:12.000000000 +0200
+++ e4rat-0.2.3-fixed/src/common.cc 2013-06-03 16:36:45.582255709 +0200
@@ -157,7 +157,7 @@ std::vector<std::string> matchPath( cons
p /= filesearch;
}
// Initialize regex filter - use * as default if nothing is given in filesearch
- std::string f( p.has_filename() ? p.filename() : "*");
+ std::string f( p.has_filename() ? p.filename().string() : "*");
fs::path dir(system_complete(p).parent_path());
if( is_directory(dir) )
@@ -166,8 +166,8 @@ std::vector<std::string> matchPath( cons
it!=boost::filesystem::directory_iterator();
++it )
{
- if( boost::regex_match( it->leaf(), path2regex(f) ) )
- fileset.push_back(it->string());
+ if( boost::regex_match( it->path().filename().string(), path2regex(f) ) )
+ fileset.push_back(it->path().filename().string());
}
return fileset;
}
diff -rupN e4rat-0.2.3-fresh/src/config.cc e4rat-0.2.3-fixed/src/config.cc
--- e4rat-0.2.3-fresh/src/config.cc 2012-05-03 08:43:12.000000000 +0200
+++ e4rat-0.2.3-fixed/src/config.cc 2013-06-03 16:36:45.582255709 +0200
@@ -71,7 +71,7 @@ Config::Config()
return;
}
- tool_name = fs::path(argv[0]).filename();
+ tool_name = fs::path(argv[0]).filename().string();
found = tool_name.find_last_of("-");
if(found)
defaultSection = tool_name.substr(found+1);
diff -rupN e4rat-0.2.3-fresh/src/device.cc e4rat-0.2.3-fixed/src/device.cc
--- e4rat-0.2.3-fresh/src/device.cc 2012-05-03 08:43:12.000000000 +0200
+++ e4rat-0.2.3-fixed/src/device.cc 2013-06-03 16:36:45.582255709 +0200
@@ -196,13 +196,13 @@ int Device::getDevNameFromDevfs()
it != end_itr;
++it )
{
- if(it->filename() == "root")
+ if(it->path().filename().string() == "root")
continue;
- if(lstat(it->string().c_str(), &st))
+ if(lstat(it->path().filename().c_str(), &st))
continue;
if(st.st_rdev == get()->devno)
{
- get()->deviceName = it->filename();
+ get()->deviceName = it->path().filename().string();
get()->devicePath = "/dev/" + get()->deviceName;
return 0;
}
@@ -225,7 +225,7 @@ int Device::getDevNameFromMajorMinor()
// the minor number of virtual filesystems are allocated dynamically in function set_anon_super() in fs/super.c
// for convenience set deviceName and devicePath to a common name
get()->deviceName = "virtual file system";
- get()->devicePath = get()->mount_point.filename();
+ get()->devicePath = get()->mount_point.filename().string();
return 0;
case 2:
ss << "fd";
diff -rupN e4rat-0.2.3-fresh/src/e4rat-collect.cc e4rat-0.2.3-fixed/src/e4rat-collect.cc
--- e4rat-0.2.3-fresh/src/e4rat-collect.cc 2012-05-03 08:43:12.000000000 +0200
+++ e4rat-0.2.3-fixed/src/e4rat-collect.cc 2013-06-03 16:36:45.582255709 +0200
@@ -396,7 +396,7 @@ int main(int argc, char* argv[])
* Parse application list given as arguments
*/
for ( ; optind < argc; optind++)
- project.observeApp(fs::path(argv[optind]).filename());
+ project.observeApp(fs::path(argv[optind]).filename().string());
/*
* Parse application list on stdin
......@@ -8,49 +8,52 @@
# Mark Rosenstand <mark@archlinux.org>
pkgname=fuse
pkgver=2.9.2
pkgrel=2
pkgver=2.9.3
pkgrel=1
pkgdesc="A library that makes it possible to implement a filesystem in a userspace program."
arch=('i686' 'x86_64')
url="http://fuse.sourceforge.net/"
license="GPL2"
license=('GPL2')
depends=('glibc')
makedepends=('pkgconfig')
backup=(etc/fuse.conf)
install=fuse.install
options=(!libtool)
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
'fuse.conf')
md5sums=('7d80d0dc9cc2b9199a0c53787c151205'
'c9457cf5b2196da67d5ac816d1c86a4f')
sha1sums=('94bd1974a9f2173ac3c2cf122f9fa3c35996b88e'
'3b42e37a741d4651099225987dc40e7f02a716ad')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
prepare() {
cd "$pkgname-$pkgver"
# fix building with glibc-2.14
sed -i '1i#define _GNU_SOURCE' util/fusermount.c
./configure --prefix=/usr --libdir=/usr/lib --enable-lib \
--enable-util --bindir=/bin
sed -i '1i#define _GNU_SOURCE' util/fusermount.c
sed -i "/MOUNT_FUSE_PATH=/s#/sbin#/usr/bin#" configure
}
build() {
cd "$pkgname-$pkgver"
./configure --prefix=/usr --libdir=/usr/lib \
--enable-lib --enable-util --disable-example
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
cd "$pkgname-$pkgver"
make install DESTDIR="${pkgdir}"
# static device nodes will cause collision.
rm -rf "${pkgdir}/dev"
make DESTDIR=${pkgdir} install
# Remove init script in wrong path
rm -rf "${pkgdir}/etc/init.d"
# Don't add our own for now, as fusectl fs oopses on 2.6.18
rm -rf ${pkgdir}/etc/init.d
# install sample config file
install -D -m644 "${srcdir}/fuse.conf" "${pkgdir}/etc/fuse.conf"
install -Dm644 ${srcdir}/fuse.conf ${pkgdir}/etc/fuse.conf
# remove udev rules (is in the udev package}
rm -rf ${pkgdir}/etc/udev
}
# static device nodes are handled by udev
rm -rf ${pkgdir}/dev
}
......@@ -4,49 +4,54 @@
pkgname=hfsprogs
pkgver=332.25
pkgrel=2
pkgrel=3
pkgdesc="HFS/HFS+ user space utils"
arch=('x86_64')
depends=('libbsd')
license=('custom:APSL')
url="http://www.opensource.apple.com/"
source=(http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/hfsprogs_332.25.orig.tar.gz \
http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/hfsprogs_332.25-10.debian.tar.gz \
license
makefile.patch)
md5sums=('261c3de5ec0dcf5244e3f60d79c1d6f1'
'f3d04a0380ecfbb7751abed53fb5525d'
'771f0a6036a80d929c07df49f9a3d909'
'e2429944c0192d817c700b8f0dffce6e')
source=("http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/${pkgname}_${pkgver}.orig.tar.gz"
"http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/${pkgname}_${pkgver}-11.debian.tar.gz"
"license"
"makefile.patch")
sha256sums=('74c9aeca899ed7f4bf155c65fc45bf0f250c0f6d57360ea953b1d536d9aa45e6'
'62d9b8599c66ebffbc57ce5d776e20b41341130d9b27341d63bda08460ebde7c'
'3bce072b604e0e9baa2151bff91b40915253bfb6d9d9e37445080f526ad486e2'
'4d9e36010c8bf2b2186ff22b2b30654fb7156bfbbcff0fece717f851f316b6a4')
prepare() {
# To build the package more than once you have to clear your sources tree after first build
# or to use the same sources without patching them again (makepkg -e)
#
# Apply patches
cd "diskdev_cmds-${pkgver}"
for patch in ../debian/patches/*.patch ../makefile.patch
do
msg2 "Applying patch ${patch##*/}..."
patch -Np1 -i "${patch}"
done
}
build() {
cd $srcdir/diskdev_cmds-${pkgver}
patch -Np1 -i $srcdir/debian/patches/00-create_makefiles.patch
patch -Np1 -i $srcdir/debian/patches/10-linux_specific_code.patch
patch -Np1 -i $srcdir/debian/patches/20-apple_specific_files.patch
patch -Np1 -i $srcdir/debian/patches/25-64-bit-fix.patch
patch -Np1 -i $srcdir/debian/patches/30-formatting_strings.patch
patch -Np1 -i $srcdir/debian/patches/40-printf_types.patch
patch -Np1 -i $srcdir/debian/patches/50-typo-new_fs-manpage.diff
patch -Np1 -i $srcdir/debian/patches/60-hfs-wrapper-boot-in-usr-share.diff
patch -Np1 -i $srcdir/debian/patches/70-diskdev_cmds_system_check-332.14.patch
patch -Np1 -i $srcdir/debian/patches/80-fix_manpages.patch
patch -Np1 -i $srcdir/debian/patches/90-rename_dprintf.patch
patch -Np1 -i $srcdir/debian/patches/91-remove-nils.patch
patch -Np1 -i $srcdir/debian/patches/92-fix-types.patch
patch -Np1 -i $srcdir/debian/patches/hfsplus-tools-332.14-fix-uuid.patch
patch -Np0 -i "${srcdir}/makefile.patch"
make -f Makefile.lnx
cd "diskdev_cmds-${pkgver}"
make -f Makefile.lnx
}
package() {
cd $srcdir/diskdev_cmds-${pkgver}
install -d -m 755 "$pkgdir/usr/share/hfsprogs"
install -m 644 newfs_hfs.tproj/hfsbootdata.img "$pkgdir/usr/share/hfsprogs/hfsbootdata"
install -D -m755 newfs_hfs.tproj/newfs_hfs "$pkgdir/sbin/mkfs.hfsplus"
install -D -m755 fsck_hfs.tproj/fsck_hfs "$pkgdir/sbin/fsck.hfsplus"
install -D -m644 ${srcdir}/license "$pkgdir/usr/share/licenses/hfsprogs/APSL"
install -d -m 755 "$pkgdir/usr/share/man/man8/"
install -m 644 newfs_hfs.tproj/newfs_hfs.8 "$pkgdir/usr/share/man/man8/mkfs.hfsplus.8"
install -m 644 fsck_hfs.tproj/fsck_hfs.8 "$pkgdir/usr/share/man/man8/fsck.hfsplus.8"
# Create required package directories
install -m 755 -d "${pkgdir}/usr/bin"
install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m 755 -d "${pkgdir}/usr/share/${pkgname}"
install -m 755 -d "${pkgdir}/usr/share/man/man8/"
# Copy license file
install -m 644 "license" "${pkgdir}/usr/share/licenses/${pkgname}/APSL"
# Copy executable files
cd "diskdev_cmds-${pkgver}"
install -m 755 "newfs_hfs.tproj/newfs_hfs" "${pkgdir}/usr/bin/mkfs.hfsplus"
install -m 755 "fsck_hfs.tproj/fsck_hfs" "${pkgdir}/usr/bin/fsck.hfsplus"
# Copy shared data
install -m 644 "newfs_hfs.tproj/hfsbootdata.img" "${pkgdir}/usr/share/${pkgname}/hfsbootdata"
# Copy man pages
install -m 644 "newfs_hfs.tproj/newfs_hfs.8" "${pkgdir}/usr/share/man/man8/mkfs.hfsplus.8"
install -m 644 "fsck_hfs.tproj/fsck_hfs.8" "${pkgdir}/usr/share/man/man8/fsck.hfsplus.8"
}
*** Makefile.lnx.orig 2011-01-24 14:09:57.000000000 +1000
--- Makefile.lnx 2011-01-24 14:10:41.000000000 +1000
***************
*** 1,5 ****
CC := gcc
! CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
all clean:
--- 1,5 ----
CC := gcc
! CFLAGS += `pkg-config --cflags libbsd` -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
all clean:
diff -Naur a/Makefile.lnx b/Makefile.lnx
--- a/Makefile.lnx 2014-05-03 21:05:26.619853000 +0200
+++ b/Makefile.lnx 2014-05-03 21:04:42.977667000 +0200
@@ -1,5 +1,5 @@
CC := gcc
-CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
+CFLAGS += `pkg-config --cflags libbsd` -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
all clean:
......@@ -6,19 +6,19 @@
# contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=hwdetect
pkgver=2013.08c
pkgver=2013.12
pkgrel=1
pkgdesc="Hardware detection script with loading modules and mkinitcpio.conf / rc.conf support"
arch=('any')
arch=(any)
license=('GPL')
depends=('sh' 'awk' 'grep' 'coreutils' 'sed' 'e2fsprogs')
optdepends=('cryptsetup: for encrypt mkinitcpio config support'
'dmraid: for dmraid mkinitcpio config support'
'lvm2: for lvm2 mkinitcpio config support'
'mdadm: for raid mkinitcpio config support')
source=('hwdetect')
md5sums=('0337fdaf9eea398a79b890c643258ef4')
source=(hwdetect)
package() {
install -D -m 755 ${srcdir}/hwdetect ${pkgdir}/sbin/hwdetect
install -D -m 755 "${srcdir}/hwdetect" "${pkgdir}/usr/bin/hwdetect"
}
md5sums=('b55e0501dab6599e94c3b5c54c2166bc')
......@@ -9,21 +9,30 @@ usage () {
echo " Options:"
echo " --kernel_version= use kernel version (no autodetect)"
echo " --kernel_directory= use kernel module directory (no autodetect)"
echo " --load-modules load all detected modules"
echo " --unload-modules unload all detected modules"
echo " --show-modules show all detected modules"
echo " --show-modules-order shows load order of detected modules"
echo " --show-agp show AGP modules"
echo " --show-acpi show ACPI modules"
echo " --show-block show BLOCK DEVICE modules"
echo " --show-net show NETWORK modules"
echo " --show-drm show DRM modules"
echo " --show-bluetooth show BLUETOOTH modules"
echo " --show-cdrom show CDROM modules"
echo " --show-cpufreq show CPUFREQ modules"
echo " --show-crypto show CRYPTO modules"
echo " --show-drm show DRM modules"
echo " --show-hwmon show HWMON modules"
echo " --show-i2c show I2C modules"
echo " --show-input show INPUT modules"
echo " --show-irda show IRDA modules"
echo " --show-isdn show ISDN modules"
echo " --show-pcmcia show PCMCIA modules"
echo " --show-kvm show KVM modules"
echo " --show-media show MEDIA modules"
echo " --show-net show NETWORK modules"
echo " --show-parport show PARPORT modules"
echo " --show-pcmcia show PCMCIA modules"
echo " --show-sound show SOUND modules"
echo " --show-staging show STAGING modules"
echo " --show-tpm show TPM modules"
echo " --show-watchdog show WATCHDOG modules"
echo " --show-other show OTHER modules"
echo ""
echo " For /etc/mkinitcpio.conf use:"
......@@ -42,7 +51,6 @@ usage () {
echo " --pcmcia add pcmcia to HOOKS="
echo " --nfs add net to HOOKS="
echo " --btrfs add btrfs to HOOKS="
echo " --shutdown add shutdown to HOOKS="
exit 1
}
......@@ -93,9 +101,6 @@ fi
# btrfs switch
[ "$(echo $* | grep '\-btrfs')" ] && BTRFS=1
# shutdown switch
[ "$(echo $* | grep '\-shutdown')" ] && SHUTDOWN=1
# hooks switch
[ "$(echo $* | grep '\-hooks')" ] && HOOKS=1
......@@ -107,97 +112,18 @@ fi
: >/tmp/modules-plain
: >/tmp/modules-stripped
: >/tmp/modules-sorted
: >/tmp/moduleslist
: >/tmp/.blkid
# generate blkid
blkid -c /dev/null -s TYPE > /tmp/.blkid
# find pci aliases
# find modaliases
aliases=$(find /sys/ -noleaf -name modalias -exec cat {} +)
# generate files for the different actions
modprobe -i -a --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends $aliases >> /tmp/modules-plain 2>/dev/null
# find PNP devices like parports, soundcards etc.
# (workaround for rtc, pcspkr, irtty-sir and analog are included)
if [ "$(find /sys/devices -noleaf -name 'id' | grep /pnp)" ]; then
for i in $(find /sys/devices -noleaf -name "id" | grep /pnp); do
devid=$(cat $i | grep PNP)
[ "$devid" ] || continue
modprobe -i --set-version=$KERNEL_VERSION --show-depends pnp:d${devid} >> /tmp/modules-plain 2>/dev/null
[ "$devid" = "PNP0800" ] && modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends pcspkr >> /tmp/modules-plain 2>/dev/null
[ "$devid" = "PNP0510" ] && modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends irtty-sir >> /tmp/modules-plain 2>/dev/null
[ "$devid" = "PNP0511" ] && modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends irtty-sir >> /tmp/modules-plain 2>/dev/null
[ "$devid" = "PNPb02f" ] && modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends analog >> /tmp/modules-plain 2>/dev/null
# load ppp-generic if serial ports are detected for modems
[ "$devid" = "PNP0501" ] && modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends ppp-generic >> /tmp/modules-plain 2>/dev/null
done
fi
# SCSI disks/cdroms/tapes/generic devices
if [ "$(find /sys/devices -noleaf -name 'type')" ]; then
for i in $(cat $(find /sys/devices -noleaf -name "type")); do
case $i in (4|5) modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends sr_mod >> /tmp/modules-plain 2>/dev/null ;; esac
case $i in (2|3|6|8|9) modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends sg >> /tmp/modules-plain 2>/dev/null ;; esac
case $i in (0|7|14) modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends sd_mod >> /tmp/modules-plain 2>/dev/null ;; esac
case $i in (1) modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends st >> /tmp/modules-plain 2>/dev/null ;; esac
done
fi
# add Buslogic for vmware
if [ "$VMWARE" = "1" ]; then
modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends BusLogic >> /tmp/modules-plain 2>/dev/null
fi
# Parport modules
if [ "$(grep 'parport' /tmp/modules-plain)" ]; then
modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends lp >> /tmp/modules-plain 2>/dev/null
modprobe -i --dirname=$KERNEL_DIRECTORY --set-version=$KERNEL_VERSION --show-depends ppdev >> /tmp/modules-plain 2>/dev/null
fi
sort -u /tmp/modules-plain >> /tmp/modules-stripped
# OTHER modules loading first for speed up!
grep -v "scsi/" /tmp/modules-stripped | grep -v "fusion/" | grep -v "block/sx8" | grep -v "message/fusion" | \
grep -v "block/cciss" | grep -v "block/cpqarray" | grep -v "block/DAC960" | grep -v "block/virtio" | grep -v "ata/" | \