:: Re: [DNG] netman-autostart_0.1.1
Kezdőlap
Delete this message
Reply to this message
Szerző: Edward Bartolo
Dátum:  
Címzett: Rainer Weikusat
CC: dng
Tárgy: Re: [DNG] netman-autostart_0.1.1
Hi Rainer,

I did more edits to the netman-gui.postinst script as follows:

--------------------
2) db_get netman-gui/netman-autostart
        if [ "$RET" = "true" ]; then
            file="/etc/xdg/autostart/netman.desktop";
            cp /usr/share/applications/netman.desktop /etc/xdg/autostart/
        else
            if [ -f "/etc/xdg/autostart/netman.desktop" ]; then
                rm /etc/xdg/autostart/netman.desktop
            fi    
        fi    
    ;;
--------------------


However, using dpkg-reconfiguer netman-gui I get the error:

root@edbarx-pc:/home/edbarx# dpkg-reconfigure netman-gui
/var/lib/dpkg/info/netman-gui.postinst: 24:
/var/lib/dpkg/info/netman-gui.postinst: [-f: not found

I think this has to do with incorrect script syntax.

Any hints are greatly appreciated.

Edward

On 06/01/2016, Edward Bartolo <edbarx@???> wrote:
> Hi Rainer,
>
> I edited the netman-gui.postinst script. I am attaching it to this
> email as I am not an experienced bash script programmer. You can view
> it in the attachment.
>
> netman GUI use --no-tray-icon and --auto-conn parameters. If
> --no-tray-icon is used netman GUI does not use a tray icon.
> Autoconnecting is enabled if --auto-conn is used as a parameter,
> otherwise autoconnecting is disabled.
>
> Edward
>
>
> On 06/01/2016, Rainer Weikusat <rainerweikusat@???> wrote:
>> Edward Bartolo <edbarx@???> writes:
>>> Maybe, this can shed some light on what is causing this problem. The
>>> first time dpkg-reconfigure is used on netman-gui it doesn't exit
>>> complaining the netman.desktop file is not found. This may mean the
>>> netman.desktop file is being deleted by a script called by
>>> dpkg-reconfigure, maybe, netman-gui.postinst?
>>
>>         2) db_get netman-gui/netman-autostart
>>                 if [ "$RET" = "true" ]; then
>>                         file="/etc/xdg/autostart/netman.desktop";
>>                         mv /usr/share/applications/netman.desktop
>> /etc/xdg/autostart/
>>                 fi
>>         ;;

>>
>> This moves the /usr/share/applications/netman.desktop file to
>> /etc/xdg/autostart, consequently, /usr/share/applications/netman.desktop
>> doesn't exist anymore afterwards. And it doesn't do anything in order to
>> disable autostartf if $RET is not true. If the /etc/xdg/autostart file
>> is not supposed to be modified, I suggest creating a symlink instead, ie
>>
>> ln -s /usr/share/applications/netman.desktop /etc/xdg/autostart/
>>
>> You could also use cp instead of mv so that the autostart file will be a
>> copy of the original.
>>
>> _______________________________________________
>> Dng mailing list
>> Dng@???
>> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>>
>