--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100826012730.45830@gmx.net">http://lists.debian.org/20100826012730.45830@gmx.net
08-27-2010, 12:08 AM
T o n g
Tell Ubuntu and Debian apart in a shell script ...
On Thu, 26 Aug 2010 02:03:55 +0200, Oliver Schneider wrote:
> (which lsb_release > /dev/null && `which lsb_release` --id)|awk '{print
> $3}'
>
> ... does not work on older systems which don't have lsb_release, though.
Is lsb_release mandatory? I'm using latest testing and I don't have it.
So if your script depends on lsb_release, then it is specific to your
setting.
> Still looking,
How about /etc/rc.local
I have such file (yet still wondering where it comes from), which says,
# By default this script does nothing.
And it seems to me that Ubuntu doesn't have it [1].
Any comment?
1. https://help.ubuntu.com/community/RcLocalHowto
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i56vmc$3dn$1@dough.gmane.org">http://lists.debian.org/i56vmc$3dn$1@dough.gmane.org
08-27-2010, 02:31 AM
Kevin Ross
Tell Ubuntu and Debian apart in a shell script ...
On 8/26/2010 5:08 PM, T o n g wrote:
On Thu, 26 Aug 2010 02:03:55 +0200, Oliver Schneider wrote:
Tell Ubuntu and Debian apart in a shell script ...
Debian vs Ubuntu is not the same as Debian vs say RedHat. Sometimes
it's hard to tell them apart even by hand because you can easily mix
deb packages between them if you want. It can be Debian with package X
from Ubuntu. Or it can be Knoppix dist-upgraded to Debian. Generally I
think it's a good idea to check for some specific functionality you
need in your script rather than rely a on distribution name from some
file in /etc.
Or you need that just for nice output/logging?
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin3TeqMoZZrk6LQL0rzan47BH=ak6J5+fMcS6Vy@mail .gmail.com">http://lists.debian.org/AANLkTin3TeqMoZZrk6LQL0rzan47BH=ak6J5+fMcS6Vy@mail .gmail.com
08-27-2010, 11:07 PM
Ron Johnson
Tell Ubuntu and Debian apart in a shell script ...
On 08/27/2010 03:28 AM, Alexey Salmin wrote:
[snip]
think it's a good idea to check for some specific functionality you
need in your script rather than rely a on distribution name from some
file in /etc.
This is Best Practices when writing a web page: check for
functionality, not whether it's IE, FF, Safari, etc.
--
Seek truth from facts.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org