:: Re: [DNG] Debianising my uploaded v…
Top Pagina
Delete this message
Reply to this message
Auteur: aitor_czr
Datum:  
Aan: Edward Bartolo, dng@lists.dyne.org
Onderwerp: 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.