diff --git a/inxi b/inxi index aaa8a12..94c803d 100755 --- a/inxi +++ b/inxi @@ -3,7 +3,7 @@ #### Script Name: inxi #### version: 1.6.10 #### Date: June 17 2011 -#### Patch Number: 08 +#### Patch Number: 09 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -1749,6 +1749,8 @@ get_parameters() B_SHOW_DISK_TOTAL='true' B_SHOW_GRAPHICS='true' B_SHOW_INFO='true' + B_SHOW_MACHINE='true' + B_SHOW_NETWORK='true' B_SHOW_SYSTEM='true' ;; c) if [[ -n $( grep -E '^[0-9][0-9]?$' <<< $OPTARG ) ]];then @@ -1814,6 +1816,7 @@ get_parameters() B_SHOW_INFO='true' B_SHOW_MACHINE='true' B_SHOW_NETWORK='true' + B_SHOW_OPTICAL_DRIVES='true' B_SHOW_PARTITIONS='true' B_SHOW_SENSORS='true' B_SHOW_SYSTEM='true' @@ -1912,6 +1915,7 @@ get_parameters() B_SHOW_UUIDS='true' fi if [[ $OPTARG -ge 6 ]];then + B_SHOW_OPTICAL_DRIVES='true' B_SHOW_PARTITIONS_FULL='true' B_SHOW_UNMOUNTED_PARTITIONS='true' fi @@ -2058,7 +2062,7 @@ show_options() print_screen_output "- - - - - - - - - - - - - - - - - - - - - - - - - - - - -" print_screen_output "Output Control Options:" print_screen_output "-A Show Audio/sound card information." - print_screen_output "-b Shows basic output, short form (previously -d). Same as: $SCRIPT_NAME -v 1" + print_screen_output "-b Shows basic output, short form (previously -d). Same as: $SCRIPT_NAME -v 2" print_screen_output "-c Available color schemes. Scheme number is required. Color selectors run a color selector option" print_screen_output " prior to $SCRIPT_NAME starting which lets you set the config file value for the selection." print_screen_output " Supported color schemes: 0-$color_scheme_count Example: $SCRIPT_NAME -c 11" @@ -2070,9 +2074,10 @@ show_options() print_screen_output " 98 - Console IRC not in X" print_screen_output " 99 - Global - Overrides/removes all settings. Setting specific removes global." print_screen_output "-C Show full CPU output, including per CPU clockspeed." + print_screen_output "-d Shows optical drive data. Same as -Dd. With -x, adds features line to output. -xx adds a few more features." print_screen_output "-D Show full hard Disk info, not only model, ie: /dev/sda ST380817AS 80.0GB." print_screen_output "-f Show all cpu flags used, not just the short list. Not shown with -F to avoid spamming." - print_screen_output "-F Show Full output for $SCRIPT_NAME. Includes all Upper Case line letters, plus -s and -n." + print_screen_output "-F Show Full output for $SCRIPT_NAME. Includes all Upper Case line letters, plus -s, -d, and -n." print_screen_output " Does not show extra verbose options like -f -u -l -o -p -t -r" print_screen_output "-G Show Graphic card information (card, x type, resolution, glx renderer, version)." print_screen_output "-i Show Wan IP address, and shows local interfaces (requires ifconfig network tool). Same as -Nni" @@ -2099,15 +2104,17 @@ show_options() print_screen_output "-v Script verbosity levels. Verbosity level number is required. Should not be used with -b or -F" print_screen_output " Supported levels: 0-${VERBOSITY_LEVELS} Example: $SCRIPT_NAME -v 4" print_screen_output " 0 - Short output, same as: $SCRIPT_NAME" - print_screen_output " 1 - Basic verbose, -S + basic CPU + -G + basic Disk + -I. Same as: $SCRIPT_NAME -b" + print_screen_output " 1 - Basic verbose, -S + basic CPU + -G + basic Disk + -I." print_screen_output " 2 - Adds networking card (-N), Machine (-M) data, and shows basic hard disk data (names only)." + print_screen_output " Same as: $SCRIPT_NAME -b" print_screen_output " 3 - Adds advanced CPU (-C), network (-n) data, and switches on -x advanced data option." print_screen_output " 4 - Adds partition size/filled data (-P) for (if present):/, /home, /var/, /boot" print_screen_output " Shows full disk data (-D)" print_screen_output " 5 - Adds audio card (-A); sensors (-s), partion label (-l) and UUID (-u)." - print_screen_output " 6 - Adds full partition data (-p), unmounted partition data (-o)." + print_screen_output " 6 - Adds full partition data (-p), unmounted partition data (-o), optical drive data (-d)." print_screen_output "-x Show extra data (only works with verbose or line output, not short form): " print_screen_output " -C - bogomips on Cpu;" + print_screen_output " -d - Adds drive features line to optical drive; adds rev version to optical drive." print_screen_output " -N -A - Adds version/port(s)/driver version (if available) for Network/Audio;" print_screen_output " -N -A -G - Network, audio, graphics, shows PCI Bus ID/Usb ID number of card;" print_screen_output " -S - Desktop toolkit if avaliable (GNOME/XFCE/KDE only)" @@ -2117,6 +2124,7 @@ show_options() print_screen_output " /etc/sudoers (sudo v. 1.7 or newer): ALL = NOPASSWD: /usr/sbin/hddtemp (sample)" print_screen_output " -t - Adds memory use output to cpu (-xt c), and cpu use to memory (-xt m)." print_screen_output "-xx Show extra, extra data (only works with verbose or line output, not short form): " + print_screen_output " -d - Adds some optical drive features, like state." print_screen_output " -M - Adds chassis information, if any data for that is available." print_screen_output "-z Adds security filters for IP addresses, Mac, and user home directory name. Default on for irc clients." print_screen_output "-Z Absolute override for output filters. Useful for debugging networking issues in irc for example." @@ -4519,7 +4527,6 @@ get_optical_drive_data() if [[ -n $dev_disks_real ]];then dev_disks_links=$( ls /dev/dvd* /dev/cd* /dev/scd* 2>/dev/null ) -# B_EXTRA_DATA='true' if [[ $B_EXTRA_DATA == 'true' ]];then proc_cdrom="$( cat /proc/sys/dev/cdrom/info 2>/dev/null )" fi @@ -4569,8 +4576,8 @@ get_optical_drive_data() ' <<< $vendor ) fi - - if [[ $B_EXTRA_DATA == 'true' && -n $proc_cdrom ]];then + # this needs to run no matter if there's proc data or not to create the array comma list + if [[ $B_EXTRA_DATA == 'true' ]];then cpuinfo_string=$( gawk -v diskId=$disk ' BEGIN { IGNORECASE=1 @@ -4633,13 +4640,11 @@ get_optical_drive_data() ) ) IFS="$ORIGINAL_IFS" fi -# echo ${#A_OPTICAL_DRIVE_DATA[@]} temp_array=${A_OPTICAL_DRIVE_DATA[@]} -# echo $temp_array log_function_data "A_OPTICAL_DRIVE_DATA: $temp_array" eval $LOGFE } -# get_optical_drive_data;exit + get_partition_data() { eval $LOGFS