| Server IP : 20.75.53.88 / Your IP : 216.73.217.138 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/usr/share/initramfs-tools/hooks/ |
Upload File : |
#!/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/