#!/bin/sh -eu

FILE="$DEST/altinst/usr/share/install2/postinstall.d/08-install-synchrone.sh"

echo "Injecting synchrone installer..."

cat > "$FILE" << EOF
#!/bin/sh -efu

. install2-init-functions

cp-metadata \$destdir/root/synchrone.tar
exec_chroot tar xf /root/synchrone.tar --no-overwrite-dir --no-same-owner -C /
exec_chroot chkconfig --add synchrone
EOF

chmod 755 "$FILE"

echo "Done."

