Reference:http://wiki.loovsys.eu/index.php/HP_Data_Protector_installation_on_qnap_TS-X69U#!/bin/sh PATH=/opt/bin:/bin:/usr/bin:/usr/sbin:$PATHexport PATH if [ ! -s "/etc/opt" ] then echo "Linking /etc/opt to /opt/dp_etc/opt" ln -s /opt/dp_etc/opt /etc/opt fi if [ ! -s "/var/opt" ] then echo "Linking /var/opt to /opt/dp_var/opt" ln -s /opt/dp_var/opt /var/opt fi if [ ! -f /etc/redhat-release ] then echo "I am redhat, true story" cp /opt/dp_misc/redhat-release /etc/redhat-release fi cat /etc/mtab | grep -q "tmpfs / tmpfs" if [ $? -ne 0 ] then echo "Adding nicer mountpoint of root to mtab" echo "tmpfs / tmpfs rw 0 0" >> /etc/mtab fi cat /etc/services | grep -q "5555" if [ $? -ne 0 ] then echo "Adding OMNI to /etc/services" echo "omni 5555/tcp # DATA-PROTECTOR" >> /etc/services fi while [ 1 -gt 0 ] do if [ -x /share/MD0_DATA/.qpkg/Optware/sbin/xinetd ] then /share/MD0_DATA/.qpkg/Optware/sbin/xinetd break fi sleep 5 done
Reference:
http://wiki.loovsys.eu/index.php/HP_Data_Protector_installation_on_qnap_TS-X69U
#!/bin/sh
PATH=/opt/bin:/bin:/usr/bin:/usr/sbin:$PATH
export PATH
if [ ! -s "/etc/opt" ]
then
echo "Linking /etc/opt to /opt/dp_etc/opt"
ln -s /opt/dp_etc/opt /etc/opt
fi
if [ ! -s "/var/opt" ]
then
echo "Linking /var/opt to /opt/dp_var/opt"
ln -s /opt/dp_var/opt /var/opt
fi
if [ ! -f /etc/redhat-release ]
then
echo "I am redhat, true story"
cp /opt/dp_misc/redhat-release /etc/redhat-release
fi
cat /etc/mtab | grep -q "tmpfs / tmpfs"
if [ $? -ne 0 ]
then
echo "Adding nicer mountpoint of root to mtab"
echo "tmpfs / tmpfs rw 0 0" >> /etc/mtab
fi
cat /etc/services | grep -q "5555"
if [ $? -ne 0 ]
then
echo "Adding OMNI to /etc/services"
echo "omni 5555/tcp # DATA-PROTECTOR" >> /etc/services
fi
while [ 1 -gt 0 ]
do
if [ -x /share/MD0_DATA/.qpkg/Optware/sbin/xinetd ]
then
/share/MD0_DATA/.qpkg/Optware/sbin/xinetd
break
fi
sleep 5
done