Visit Our UNIX and Linux User Community


SVR4 or BSD?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users SVR4 or BSD?
# 1  
Old 08-21-2002
SVR4 or BSD?

Can we determine (reliably or guaranteed) at runtime if a system is SVR4 or BSD based, using two methods, shell and binary (C code)?
# 2  
Old 08-21-2002
20 years ago the unix world was divided into two camps: USG (Unix Support Group) which includes stuff like System III and all of the various System V's and BSD (Berkeley Software Distribution) which was the various Berkeley releases. That hasn't been true for a long time.

A pure SVR4 system is actually rather rare. NetBSD and FreeBSD are stronger, but most versions of Unix have combinations of feature from both camps. SunOS and HP-UX are the commercial versions of unix with the largest market share. Linux is the free version of unix that is most widely used. None of these 3 OS's can be said to be SVR4 or BSD.

The thing to do these days is to test feature by feature. Also most versions of Unix support Posix so you can restrict yourself to those things that Posix defines and have a pretty good shot at working.

A pure BSD system will have the select() system call. A pure SVR4 system will have the poll() system call. HP-UX and SunOS support both. Most things are like that.

But to answer your question, in case you really have a shop that has only BSD and SVR4...

In C you used to stuff like:

#ifdef USG
Note that this is done at compile time, not at runtime.

In a shell script, inspect the output of from the uname command, and this can be done at runtime.
# 3  
Old 08-21-2002
Thanks for the reply.

I was looking for confirmation of the difficaulty because of merged features, I know of the poll/select difference and have seen scripts that check for certain directory structures but have never seen anything conrete.

Thanks again, as always it's never a straightforward answer Smilie

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. What is on Your Mind?

How to switch from SVR4/BSD internals to Linux internals?

Hello, Long-time Unix hacker here - I've worked on four variants of the kernel prior to the introduction of Linux. In my spare time, I've written Linux (Ubuntu) device drivers, kernel modules, cross-compiled, and built the kernel. I'd like to do Linux internals/device drivers as a day job,... (1 Reply)
Discussion started by: OriginalVersion
1 Replies

2. Hardware

Upgrading antique Unisys U6000 / UNIX SVR4 1.2?

I have an old Unisys U6000/65 server I obtained as surplus about 12 years ago. For its day (1993) this server line was capable of insane ability, up to 4 gig of memory using dozens of 30-pin SIMMs and up to six processors, including mixed processor speeds and types (486/Pentium) in the same... (2 Replies)
Discussion started by: DMahalko
2 Replies

3. UNIX for Advanced & Expert Users

need help adding network printer on SVR4

We have a very old and unsupported box. It runs DC/OSx, SVR4. For the past 12 years all printers have been connected via terminal servers and working well. Now those terminal servers are dying and cannot be replaced or repaired. Of course the right solution is to upgrade, but that's not gonna... (10 Replies)
Discussion started by: jbcamel
10 Replies

4. Virtualization and Cloud Computing

SVR4 on virtual machine help

Hello to all UNIX experts! This is my problem: I have to emulate an old UNIX System 5 release 4 on a virtual machine. I've got 30 images (.IMA) of 1.4M floppy where there is the installation of SVR4. How I can install it with those files? I tried with Vmware 7 workstation but it says 'Operating... (6 Replies)
Discussion started by: mghis
6 Replies

5. UNIX for Dummies Questions & Answers

Copying large file problem on SVR4 Unix

We have 3 Unix servers all running SVR4 Unix 1.4. I have no problems copying files to and from 2 of the servers using either the rcp command or ftp but when i come to transfer large files to the third server the copy gives up part way through and crashes this server. Copying smaller files using RCP... (7 Replies)
Discussion started by: coatesd
7 Replies

6. UNIX for Dummies Questions & Answers

SVR4 UNIX questions

Hi My main problem is trying to reset the password on an ancient (but still live) server. I have booted from floppy into maintenance mode, but it won't allow me to mount /. I'm using mount -F vxfs /dev/dsk/c0t0d0s1 /mnt and I get an error message along the lines of "operation not applicable... (2 Replies)
Discussion started by: sweetleaf
2 Replies

7. BSD

for linux and BSD users interested in Unix system V/bsd

for all you unix/linux interested heres an online book for free that covers the basics of BSD SysV Unix commands and applications . giving the average linux user a perspective on the differences in context of the two operating systems and for BSD users covers material as a refernce guide. ... (0 Replies)
Discussion started by: moxxx68
0 Replies

Featured Tech Videos