:: Re: [DNG] netman-autostart_0.1.1
Top Pagina
Delete this message
Reply to this message
Auteur: Edward Bartolo
Datum:  
Aan: Rainer Weikusat
CC: dng
Onderwerp: Re: [DNG] netman-autostart_0.1.1
Hi Rainer,

Thanks so far. The netman-gui.postinst is adding the Exec= line
without removing the previous one. It is also doing the same thing
with the Comment= line.

Here is what netman.desktop looks like:

---------------------
[Desktop Entry]
Categories=Application;Network;
Exec=netman
Exec=netman --auto-conn
Comment=Display network connection status in the system tray
Exec=netman --auto-conn
Comment=Display network connection status in the system tray
GenericName=Netman
Icon=netman
Name=Netman Network Manager
Comment=Start netman without system tray icon
Terminal=false
Type=Application
Categories=Network;
------------------------

As you can see, it is corrupted. I have yet to determine why the
--no-tray-icon parameter is never added.

Edward

On 06/01/2016, Rainer Weikusat <rainerweikusat@???> wrote:
> Edward Bartolo <edbarx@???> writes:
>>
>> 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
>
> The shell starts parsing something with splitting on unquoted whitespace
> in order to turn the input into a sequence of 'words'. This means if
> there's no whitespace between [ and -f, this won't end up invoking the
> [ with an argument of -f but as [-f. Since the shell doesn't know
> anything about that, it will try to run a program named [-f (which
> doesn't exist).
>
> The test can be omitted by using
>
> rm -f ...
>
> instead. Attempts to remove a file which doesn't exist then won't cause
> rm to exist with an error status.
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>