default_install  &&

for conf in options pap-secrets.example chap-secrets.example; do
  if install_config_file "etc.ppp/$conf" \
                         "$INSTALL_ROOT/etc/ppp/${conf%.example}" ;then
    chown root:ppp "$INSTALL_ROOT/etc/ppp/$conf" &&
    chmod 0600     "$INSTALL_ROOT/etc/ppp/$conf"
  fi
done &&

install  -d  -m 0755  -o root  -g ppp  $INSTALL_ROOT/etc/ppp/peers  &&
install  -d  -m 0755  -o root  -g ppp  $INSTALL_ROOT/etc/ppp/chat   &&

cp  $SCRIPT_DIRECTORY/pon      $INSTALL_ROOT/usr/bin          &&
cp  $SCRIPT_DIRECTORY/poff     $INSTALL_ROOT/usr/bin          &&
cp  $SCRIPT_DIRECTORY/ip-up    $INSTALL_ROOT/etc/ppp/ip-up    &&
cp  $SCRIPT_DIRECTORY/ip-down  $INSTALL_ROOT/etc/ppp/ip-down  &&

#
# If we install a new config file then make sure the permissions are correct
#
if  install_config_file  $SCRIPT_DIRECTORY/resolv.conf      \
                            $INSTALL_ROOT/etc/ppp/resolv.conf;  then
  chown  root:ppp  $INSTALL_ROOT/etc/ppp/resolv.conf
fi  &&

if  install_config_file  $SCRIPT_DIRECTORY/peers          \
                            $INSTALL_ROOT/etc/ppp/peers/isp;  then
  chown  root:ppp  $INSTALL_ROOT/etc/ppp/peers/isp
fi  &&

if  install_config_file  $SCRIPT_DIRECTORY/isp           \
                            $INSTALL_ROOT/etc/ppp/chat/isp;  then
  chown  root:ppp  $INSTALL_ROOT/etc/ppp/chat/isp
fi  &&

chown  root:ppp     ${INSTALL_ROOT}/usr/sbin/pppd  &&
chmod  4750         ${INSTALL_ROOT}/usr/sbin/pppd
