A second qmail instance on SME Server, see https://wiki.contribs.org/AltQmail
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.3 KiB

11 years ago
#! /bin/sh
exec 2>&1
/bin/mount --bind /var/qmail/bin/ root/var/qmail/bin
11 years ago
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
cp -a /$LIBDIR/libgssapi_krb5.so.2.2 root/$LIBDIR
ln -s libgssapi_krb5.so.2.2 root/$LIBDIR/libgssapi_krb5.so.2
cp -a /$LIBDIR/libkrb5.so.3.3 root/$LIBDIR
ln -s libkrb5.so.3.3 root/$LIBDIR/libkrb5.so.3
cp -a /$LIBDIR/libcom_err.so.2.1 root/$LIBDIR
ln -s libcom_err.so.2.1 root/$LIBDIR/libcom_err.so.2
cp -a /$LIBDIR/libk5crypto.so.3.1 root/$LIBDIR
ln -s libk5crypto.so.3.1 root/$LIBDIR/libk5crypto.so.3
cp -a /$LIBDIR/libdl-$LIBC.so root/$LIBDIR
ln -s libdl-$LIBC.so root/$LIBDIR/libdl.so.2
cp -a /$LIBDIR/libz.so.1.2.3 root/$LIBDIR
ln -s libz.so.1.2.3 root/$LIBDIR/libz.so.1
cp -a /$LIBDIR/libkrb5support.so.0.1 root/$LIBDIR
ln -s libkrb5support.so.0.1 root/$LIBDIR/libkrb5support.so.0
cp -a /$LIBDIR/libkeyutils.so.1.3 root/$LIBDIR
ln -s libkeyutils.so.1.3 root/$LIBDIR/libkeyutils.so.1
cp -a /$LIBDIR/libpthread-$LIBC.so root/$LIBDIR
ln -s libpthread-$LIBC.so root/$LIBDIR/libpthread.so.0
cp -a /$LIBDIR/libselinux.so.1 root/$LIBDIR
fi
if [ ! -d root/usr/$LIBDIR ]; then
cp -a /usr/$LIBDIR/libssl.so.1.0.1e root/usr/$LIBDIR
ln -s libssl.so.1.0.1e root/usr/$LIBDIR/libssl.so.10
cp -a /usr/$LIBDIR/libcrypto.so.1.0.1e root/usr/$LIBDIR
ln -s libcrypto.so.1.0.1e root/usr/$LIBDIR/libcrypto.so.10
11 years ago
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/