:: Re: [DNG] Debianising my uploaded v…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: aitor_czr
Fecha:  
A: Edward Bartolo, dng@lists.dyne.org
Asunto: Re: [DNG] Debianising my uploaded version of netman.
On 14/12/15 17:10, Edward Bartolo <edbarx@???> wrote:
> I am thinking about making autostarting and connecting automatically
> >to wifi optional during the installation process of netman. This
> >means, I need to write a post installation script or if its already
> >exists, add a few lines to it, so that users can choose how to set up
> >netman.


Hi Edward,

I made some changes in netman-gui.postinst:

#!/bin/sh
if [ "$1" = "configure" ]; then
     /sbin/ldconfig
fi


while true; do
  read -p "Do you want netman to use a systray icon? (Y/n)" yn
  case $yn in
     [Nn]* ) line="exec=netman";
             file="/etc/xdg/autostart/netman.desktop";
             break;;
         * ) line="exec=netman --systray";
             file="/usr/share/applications/netman.desktop";
             break;;
  esac
done


while true; do
  read -p "Do you want netman to automatically connect on startup? (Y/n)" yn
  case $yn in
     [Nn]* ) break;;
         * ) line=${line}" --auto-conn";
             break;;
  esac
done


> ${file}

echo "[Desktop Entry]" >> ${file}
echo "Name=Netman" >> ${file}
echo "Terminal=false" >> ${file}
echo "${line}" >> ${file}
echo "Icon=/usr/share/pixmaps/netman.ico" >> ${file}
echo "Type=Application" >> ${file}
echo "Categories=Application;Network;" >> ${file}
echo "Version=0.1.1" >> ${file}

#DEBHELPER#
exit 0

Cheers,

      Aitor.