:: Re: [DNG] Debianising my uploaded v…
Página Inicial
Delete this message
Reply to this message
Autor: Rainer Weikusat
Data:  
Para: dng\@lists.dyne.org
Assunto: Re: [DNG] Debianising my uploaded version of netman.
aitor_czr <aitor_czr@???> writes:
> 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


The package doesn't "install shared libraries to default library
directory", hence, there's no reason why the postinst would need to run
ldconfig.

> 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


This is broken, cf

    Maintainer scripts are not guaranteed to run with a controlling
    terminal and may not be able to interact with the user.


    https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-controllingterminal


and     


    https://www.debian.org/doc/debian-policy/ch-binary.html#s-maintscriptprompt