|
51 | 51 | # - changed Debian specifics, codename anticipates release num |
52 | 52 | # |
53 | 53 | # Description: |
54 | | -# Collect information from sourceable /etc/lsb-release file (present on |
55 | | -# LSB-compliant systems) : LSB_VERSION, DISTRIB_ID, DISTRIB_RELEASE, |
56 | | -# DISTRIB_CODENAME, DISTRIB_DESCRIPTION (all optional) |
| 54 | +# Find and parse the /etc/[distro]-release file |
| 55 | +# Collect information from sourceable /etc/lsb-release file for overriding |
| 56 | +# (present on LSB-compliant systems) : LSB_VERSION, DISTRIB_ID, |
| 57 | +# DISTRIB_RELEASE, DISTRIB_CODENAME, DISTRIB_DESCRIPTION (all optional) |
57 | 58 | # Then (if needed) find and add names from /etc/lsb-release.d |
58 | | -# Then (if needed) find and parse the /etc/[distro]-release file |
59 | 59 |
|
60 | 60 |
|
61 | 61 | ############################################################################### |
@@ -274,13 +274,7 @@ EASE ($DISTRIB_CODENAME)" |
274 | 274 |
|
275 | 275 | # Check missing and requested infos, then find the file and get infos |
276 | 276 | GetDistribInfo() { |
277 | | - NO="" # /etc/lsb-release data are enough to reply what is requested? |
278 | | - [ -n "$ARG_D" ] && [ -z "$DISTRIB_DESCRIPTION" ] && NO="y" |
279 | | - [ -z "$NO" ] && [ -n "$ARG_I" ] && [ -z "$DISTRIB_ID" ] && NO="y" |
280 | | - [ -z "$NO" ] && [ -n "$ARG_R" ] && [ -z "$DISTRIB_RELEASE" ] && NO="y" |
281 | | - [ -z "$NO" ] && [ -n "$ARG_C" ] && [ -z "$DISTRIB_CODENAME" ] && NO="y" |
282 | | - |
283 | | - if [ -n "$NO" ] |
| 277 | + if [ -n "$ARG_D" ] || [ -n "$ARG_I" ] || [ -n "$ARG_R" ] || [ -n "$ARG_C" ] |
284 | 278 | then |
285 | 279 | if [ ! -f "$CHECKFIRST" ] |
286 | 280 | then |
|
410 | 404 | fi |
411 | 405 |
|
412 | 406 | # Initialization |
413 | | -GetLSBInfo |
414 | 407 | GetDistribInfo |
| 408 | +GetLSBInfo |
415 | 409 |
|
416 | 410 | # Display requested infos (order as follow) |
417 | 411 | [ -n "$ARG_V" ] && DisplayVersion |
|
0 commit comments