#! /bin/sh exec 2>&1 /bin/mount --bind /var/qmail/bin/ root/var/qmail/bin if [ ! -d root/etc ]; then mkdir root/etc cp -a /etc/resolv.conf root/etc cp -a /etc/services root/etc cp -a /etc/passwd root/etc cp -a /etc/group root/etc fi LIBDIR="lib" LIBC="2.5" if [ -d /lib64 ]; then LIBDIR="lib64" fi if [ -e /$LIBDIR/libc-2.12.so ]; then LIBC="2.12" fi if [ ! -d root/$LIBDIR ]; then mkdir root/$LIBDIR cp -a /$LIBDIR/libc-$LIBC.so root/$LIBDIR ln -s libc-$LIBC.so root/$LIBDIR/libc.so.6 cp -a /$LIBDIR/ld-$LIBC.so root/$LIBDIR if [ -d /lib64 ]; then ln -s ld-$LIBC.so root/$LIBDIR/ld-linux-x86-64.so.2 else ln -s ld-$LIBC.so root/$LIBDIR/ld-linux.so.2 fi cp -a /$LIBDIR/libnss_files-$LIBC.so root/$LIBDIR ln -s libnss_files-$LIBC.so root/$LIBDIR/libnss_files.so.2 cp -a /$LIBDIR/libresolv-$LIBC.so root/$LIBDIR ln -s libresolv-$LIBC.so root/$LIBDIR/libresolv.so.2 fi chown qmails:qmail root/var/qmail/queue/lock/trigger chmod 622 root/var/qmail/queue/lock/trigger exec \ /usr/bin/env - PATH="/var/qmail/bin:/bin:/usr/bin:/usr/local/bin" \ /usr/sbin/chroot root /var/qmail/bin/qmail-start \ ./Maildir/