~zulcss/ubuntu/lucid/likewise-open/likewise-open-sru

« back to all changes in this revision

Viewing changes to domainjoin/libdomainjoin/src/djdistroinfo.c

  • Committer: Bazaar Package Importer
  • Author(s): Rick Clark
  • Date: 2008-08-27 08:56:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080827085620-5q0f58b9qtog9myq
Tags: 4.1.0.2956-0ubuntu1
* missing-likewise-logo.diff: removed
* fixed copyright notice
* updated Standards-Version to 3.8.0
* removed path from command in prerm
* removed stop in S runlevel

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
                /*
115
115
                # The format of the line is something like:
116
116
                #   Red Hat Enterprise Linux ES release 4 (Nahant Update 1)
117
 
                #   Red Hat Advanced Server release 2.1AS (Pensacola)
 
117
                #   Red Hat Linux Advanced Server release 2.1AS (Pensacola)
118
118
                #   Red Hat Enterprise Linux Client release 5 (Tikanga)
119
119
                # In addition, Oracle Linux reports itself as:
120
120
                #   Enterprise Linux Enterprise Linux AS release 4 (October Update 5)
121
121
                */
122
122
                //Find a matching distro name
123
 
                "^\\s*((Red Hat)|(Enterprise Linux)) ((Enterprise Linux)|(Linux (Advanced|Enterprise) Server))\\s+(AS |ES |Client )?"
 
123
                "^[[:space:]]*((Red Hat)|(Enterprise Linux)) ((Enterprise Linux)|(Linux (Advanced|Enterprise) Server))[[:space:]]+(AS |ES |Client )?"
124
124
                //Get the version number, but strip the minor version if it is
125
125
                //present (RHEL 2 has one). Also remove the AS or ES
126
126
                //suffix if it is present.
127
 
                "release ([[:digit:]]+)(\\.[[:digit:]]+)?(AS|ES)?(\\s+\\(.*\\))?\\s*$",
 
127
                "release ([[:digit:]]+)(\\.[[:digit:]]+)?(AS|ES)?([[:space:]]+\\(.*\\))?[[:space:]]*$",
128
128
                9,
129
129
                1
130
130
            },
135
135
                # The format of the line is something like:
136
136
                #   Red Hat Linux release 7.3 (Valhala)
137
137
                */
138
 
                "^\\s*Red Hat Linux release ([[:digit:]]+(\\.[[:digit:]]+)?)",
 
138
                "^[[:space:]]*Red Hat Linux release ([[:digit:]]+(\\.[[:digit:]]+)?)",
139
139
                1,
140
140
                1
141
141
            },
146
146
                # The format of the line is something like:
147
147
                #   Fedora Core release 4 (Stentz)
148
148
                */
149
 
                "^\\s*Fedora (Core )?release (\\S+)",
 
149
                "^[[:space:]]*Fedora (Core )?release (\\S+)",
150
150
                2,
151
151
                1
152
152
            },
157
157
                # The format of the line is something like:
158
158
                #   CentOS release 4.x (Final)
159
159
                */
160
 
                "^\\s*CentOS release ([[:digit:]]+)"
 
160
                "^[[:space:]]*CentOS release ([[:digit:]]+)"
161
161
                //Trim off the minor version number
162
162
                "(\\.[[:digit:]]+)?",
163
163
                1,
166
166
            {
167
167
                DISTRO_SUSE,
168
168
                "/etc/SuSE-release",
169
 
                "^\\s*SUSE LINUX ([[:digit:]]+\\.[[:digit:]]+)\\s+",
 
169
                "^[[:space:]]*SUSE LINUX ([[:digit:]]+\\.[[:digit:]]+)[[:space:]]+",
170
170
                1,
171
171
                0
172
172
            },
173
173
            {
174
174
                DISTRO_OPENSUSE,
175
175
                "/etc/SuSE-release",
176
 
                "^\\s*openSUSE ([[:digit:]]+\\.[[:digit:]]+)\\s+",
 
176
                "^[[:space:]]*openSUSE ([[:digit:]]+\\.[[:digit:]]+)[[:space:]]+",
177
177
                1,
178
178
                0
179
179
            },
180
180
            {
181
181
                DISTRO_SLES,
182
182
                "/etc/SuSE-release",
183
 
                "^\\s*SUSE LINUX Enterprise Server ([[:digit:]]+)\\s+",
 
183
                "^[[:space:]]*SUSE LINUX Enterprise Server ([[:digit:]]+)[[:space:]]+",
184
184
                1,
185
185
                0
186
186
            },
187
187
            {
188
188
                DISTRO_SLED,
189
189
                "/etc/SuSE-release",
190
 
                "^\\s*SUSE LINUX Enterprise Desktop ([[:digit:]]+)\\s+",
 
190
                "^[[:space:]]*SUSE LINUX Enterprise Desktop ([[:digit:]]+)[[:space:]]+",
191
191
                1,
192
192
                0
193
193
            },
199
199
                #   DISTRIB_ID=Ubuntu
200
200
                #   DISTRIB_RELEASE=6.06
201
201
                */
202
 
                "^\\s*DISTRIB_ID\\s*=\\s*Ubuntu\\s*\n"
203
 
                "(.*\n)?DISTRIB_RELEASE\\s*=\\s*(\\S+)\\s*(\n.*)?$",
 
202
                "^[[:space:]]*DISTRIB_ID[[:space:]]*=[[:space:]]*Ubuntu[[:space:]]*\n"
 
203
                "(.*\n)?DISTRIB_RELEASE[[:space:]]*=[[:space:]]*(\\S+)[[:space:]]*(\n.*)?$",
204
204
                2,
205
205
                1
206
206
            },
212
212
                # 3.1
213
213
                # and nothing else, so that is the version
214
214
                */
215
 
                "^\\s*(\\S+)\\s*$",
 
215
                "^[[:space:]]*(\\S+)[[:space:]]*$",
216
216
                1,
217
217
                1
218
218
            },
307
307
            info->distro = DISTRO_DARWIN;
308
308
            GCE(ceError = CTCaptureOutput("sw_vers -productVersion",
309
309
                    &info->version));
 
310
            CTStripWhitespace(info->version);
310
311
            break;
311
312
        case OS_HPUX:
312
313
            info->distro = DISTRO_HPUX;