Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / initramfs-tools / hooks / | server ip : 172.67.156.115 your ip : 172.70.130.40 H O M E |
Filename | /usr/share/initramfs-tools/hooks/mountall |
Size | 1.68 kb |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 09:50 |
Last modified | 22-Feb-2014 09:40 |
Last accessed | 05-Jul-2025 20:44 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/bin/sh -e
#event-driven initramfs hook for mountall
PREREQ=""
#Output prequisites
prereqs()
{
echo "$PREREQ"
}
if [ -z "$INITRAMFS_EVENT_DRIVEN" ]; then
exit 0;
fi
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/mountall
copy_exec /sbin/mntctl
mkdir -p ${DESTDIR}/lib/init/
mkdir -p ${DESTDIR}/etc/dbus-1/system.d/
cp /etc/dbus-1/system.d/Mountall.Server.conf ${DESTDIR}/etc/dbus-1/system.d/
# Following is needed for mountall authentication with dbus
cp /etc/passwd ${DESTDIR}/etc/
if ! grep -q '^root:' ${DESTDIR}/etc/passwd 2>/dev/null; then
echo 'root:x:0:0:root:/root:/bin/sh' >> ${DESTDIR}/etc/passwd
fi
# we use our own nsswitch - used for mountall authentication with dbus
# this is our dummy nss stack - uses libnss_files.so
echo 'passwd: files' >${DESTDIR}/etc/nsswitch.conf
echo 'group: files' >>${DESTDIR}/etc/nsswitch.conf
libnss_compat=`dpkg -L libc6 | grep libnss_compat.so.2`
if [ -f $libnss_compat ]; then
cp -uv $libnss_compat ${DESTDIR}/lib/libnss_compat.so.2
else
echo "libnss_compat.so.2 not found"
echo "warning: mountall would not be able to connect to upstart"
exit 1
fi
libnss_files=`dpkg -L libc6 | grep libnss_files.so.2`
if [ -f $libnss_files ]; then
cp -uv $libnss_files ${DESTDIR}/lib/libnss_files.so.2
else
echo "libnss_files.so.2 not found"
echo "warning: mountall would not be able to connect to upstart"
exit 1
fi
libuuid=`dpkg -L libuuid1 | grep "libuuid.so.1$"`
if [ -f $libuuid ]; then
cp -uv $libuuid ${DESTDIR}/lib/libuuid.so.1
else
echo "libuuid.so.1 not found"
echo "warning: root device may not be discovered if uuid is used in fstab"
exit 1
fi
cp /etc/blkid.conf ${DESTDIR}/etc/
#event-driven initramfs hook for mountall
PREREQ=""
#Output prequisites
prereqs()
{
echo "$PREREQ"
}
if [ -z "$INITRAMFS_EVENT_DRIVEN" ]; then
exit 0;
fi
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/mountall
copy_exec /sbin/mntctl
mkdir -p ${DESTDIR}/lib/init/
mkdir -p ${DESTDIR}/etc/dbus-1/system.d/
cp /etc/dbus-1/system.d/Mountall.Server.conf ${DESTDIR}/etc/dbus-1/system.d/
# Following is needed for mountall authentication with dbus
cp /etc/passwd ${DESTDIR}/etc/
if ! grep -q '^root:' ${DESTDIR}/etc/passwd 2>/dev/null; then
echo 'root:x:0:0:root:/root:/bin/sh' >> ${DESTDIR}/etc/passwd
fi
# we use our own nsswitch - used for mountall authentication with dbus
# this is our dummy nss stack - uses libnss_files.so
echo 'passwd: files' >${DESTDIR}/etc/nsswitch.conf
echo 'group: files' >>${DESTDIR}/etc/nsswitch.conf
libnss_compat=`dpkg -L libc6 | grep libnss_compat.so.2`
if [ -f $libnss_compat ]; then
cp -uv $libnss_compat ${DESTDIR}/lib/libnss_compat.so.2
else
echo "libnss_compat.so.2 not found"
echo "warning: mountall would not be able to connect to upstart"
exit 1
fi
libnss_files=`dpkg -L libc6 | grep libnss_files.so.2`
if [ -f $libnss_files ]; then
cp -uv $libnss_files ${DESTDIR}/lib/libnss_files.so.2
else
echo "libnss_files.so.2 not found"
echo "warning: mountall would not be able to connect to upstart"
exit 1
fi
libuuid=`dpkg -L libuuid1 | grep "libuuid.so.1$"`
if [ -f $libuuid ]; then
cp -uv $libuuid ${DESTDIR}/lib/libuuid.so.1
else
echo "libuuid.so.1 not found"
echo "warning: root device may not be discovered if uuid is used in fstab"
exit 1
fi
cp /etc/blkid.conf ${DESTDIR}/etc/