HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Linux hpasm hpadu scripts call /bin/sh but use...
Operating System - Linux
1835777
Members
4023
Online
110085
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2008 05:46 AM
02-27-2008 05:46 AM
Linux hpasm hpadu scripts call /bin/sh but use bash specific features.
Hello. I have had problems installing the debian versions of the hp tools on my departments servers. We are running Ubuntu which is probably not supported by HP, but I think this request will be helpful to other customers as well.
The install scripts and runtime tools assume that /bin/sh is a symlink to /bin/bash. On Ubuntu, /bin/sh is /bin/dash. Here is a list of files that contain bashisms but call /bin/sh. You do support debian linux and the Debian policy manual has long mandated that "shell scripts specifying '/bin/sh' as interpreter must only use POSIX features". I request that you change these scripts to either call /bin/bash or to be POSIX compliant in order to make these scripts debian compliant.
Many Thanks
# for i in `find /opt -exec file '{}' ';' | grep Bourne | sed 's/\(.*\):.*/\1/'`; do if ( head -n1 $i | grep -q '/sh' ); then checkbashisms $i; fi; done
possible bashism in /opt/hp/support/fixperms line 18 (${foo:3[:1]}):
thefile=${rline:0}
possible bashism in /opt/hp/support/fixperms line 35 (echo -n/-e):
echo -n '.'
possible bashism in /opt/hp/support/fixperms line 48 (should be 'b = a'):
if [[ $? == 0 ]]; then
possible bashism in /opt/hp/support/fixperms line 65 (echo -n/-e):
echo -n '.'
possible bashism in /opt/hp/support/hpfdtn.sh line 51 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 99 (should be 'b = a'):
if [[ $ans == "NO" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 111 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 123 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 135 (should be 'b = a'):
if [[ $ans == "ADMINISTRATOR" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 147 (should be 'b = a'):
if [[ $ans == "TRUSTBYALL" || $ans == "TRUSTBYNAME" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 180 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 193 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 219 (should be 'b = a'):
if [[ $overwrite == "false" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 287 (bash arrays, ${name[0|*|@]}):
for cfile in "${certarray[@]}"; do
possible bashism in /opt/hp/support/hpsmhd.debian line 110 (echo -n/-e):
echo -n "Stopping web server: hpsmhd"
possible bashism in /opt/hp/support/hpsmhd.debian line 125 (echo -n/-e):
echo -n "Restarting web server: hpsmhd"
possible bashism in /opt/hp/support/hpsmhd.debian line 141 (echo -n/-e):
echo -n "Forcing reload of web server: hpsmhd"
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 44 (bash arrays, H[0]):
xref[1]="a"; xref[2]="b"; xref[3]="c"; xref[4]="d"; xref[5]="e";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 45 (bash arrays, H[0]):
xref[6]="f"; xref[7]="g"; xref[8]="h"; xref[9]="i"; xref[10]="j";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 46 (bash arrays, H[0]):
xref[11]="k"; xref[12]="l"; xref[13]="m"; xref[14]="n"; xref[15]="o";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 47 (bash arrays, H[0]):
xref[16]="p"; xref[17]="q"; xref[18]="r"; xref[19]="s"; xref[20]="t";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 48 (bash arrays, H[0]):
xref[21]="u"; xref[22]="v"; xref[23]="w"; xref[24]="x"; xref[25]="y";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 49 (bash arrays, H[0]):
xref[26]="z";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 68 ('((' should be '$(('):
if((index(VENDOR,"USB FDD") !=0) ||
possible bashism in /opt/compaq/hpasm/etc/rebuild line 51 (echo -n/-e):
echo -e "\t\tCustom Build of hpasm." >> $DISTDIR/SPECS/$SPECFILE
possible bashism in /opt/compaq/hpasm/etc/hpasm line 135 (echo -n/-e):
ARGS=`echo -n $CURRENTARGS | cut -d '|' -f $I`
possible bashism in /opt/compaq/hpasm/etc/hpasm line 149 (echo -n/-e):
TESTSTRING=`echo -n $CURRENTSUBS | fgrep $BASENAME`
possible bashism in /opt/compaq/utils/hpuid_example.sh line 18 (should be 'b = a'):
if [ $1 == "ON" ]
possible bashism in /opt/compaq/utils/hpuid_example.sh line 29 (should be 'b = a'):
if [ $1 == "OFF" ]
possible bashism in /opt/compaq/utils/hpuid_example.sh line 40 (should be 'b = a'):
if [ $1 == "STATUS" ]
The install scripts and runtime tools assume that /bin/sh is a symlink to /bin/bash. On Ubuntu, /bin/sh is /bin/dash. Here is a list of files that contain bashisms but call /bin/sh. You do support debian linux and the Debian policy manual has long mandated that "shell scripts specifying '/bin/sh' as interpreter must only use POSIX features". I request that you change these scripts to either call /bin/bash or to be POSIX compliant in order to make these scripts debian compliant.
Many Thanks
# for i in `find /opt -exec file '{}' ';' | grep Bourne | sed 's/\(.*\):.*/\1/'`; do if ( head -n1 $i | grep -q '/sh' ); then checkbashisms $i; fi; done
possible bashism in /opt/hp/support/fixperms line 18 (${foo:3[:1]}):
thefile=${rline:0}
possible bashism in /opt/hp/support/fixperms line 35 (echo -n/-e):
echo -n '.'
possible bashism in /opt/hp/support/fixperms line 48 (should be 'b = a'):
if [[ $? == 0 ]]; then
possible bashism in /opt/hp/support/fixperms line 65 (echo -n/-e):
echo -n '.'
possible bashism in /opt/hp/support/hpfdtn.sh line 51 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 99 (should be 'b = a'):
if [[ $ans == "NO" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 111 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 123 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 135 (should be 'b = a'):
if [[ $ans == "ADMINISTRATOR" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 147 (should be 'b = a'):
if [[ $ans == "TRUSTBYALL" || $ans == "TRUSTBYNAME" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 180 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 193 (should be 'b = a'):
if [[ $ans == "YES" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 219 (should be 'b = a'):
if [[ $overwrite == "false" ]]; then
possible bashism in /opt/hp/support/hpfdtn.sh line 287 (bash arrays, ${name[0|*|@]}):
for cfile in "${certarray[@]}"; do
possible bashism in /opt/hp/support/hpsmhd.debian line 110 (echo -n/-e):
echo -n "Stopping web server: hpsmhd"
possible bashism in /opt/hp/support/hpsmhd.debian line 125 (echo -n/-e):
echo -n "Restarting web server: hpsmhd"
possible bashism in /opt/hp/support/hpsmhd.debian line 141 (echo -n/-e):
echo -n "Forcing reload of web server: hpsmhd"
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 44 (bash arrays, H[0]):
xref[1]="a"; xref[2]="b"; xref[3]="c"; xref[4]="d"; xref[5]="e";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 45 (bash arrays, H[0]):
xref[6]="f"; xref[7]="g"; xref[8]="h"; xref[9]="i"; xref[10]="j";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 46 (bash arrays, H[0]):
xref[11]="k"; xref[12]="l"; xref[13]="m"; xref[14]="n"; xref[15]="o";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 47 (bash arrays, H[0]):
xref[16]="p"; xref[17]="q"; xref[18]="r"; xref[19]="s"; xref[20]="t";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 48 (bash arrays, H[0]):
xref[21]="u"; xref[22]="v"; xref[23]="w"; xref[24]="x"; xref[25]="y";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 49 (bash arrays, H[0]):
xref[26]="z";
possible bashism in /opt/hp/hpadu/HTML/getusb.sh line 68 ('((' should be '$(('):
if((index(VENDOR,"USB FDD") !=0) ||
possible bashism in /opt/compaq/hpasm/etc/rebuild line 51 (echo -n/-e):
echo -e "\t\tCustom Build of hpasm." >> $DISTDIR/SPECS/$SPECFILE
possible bashism in /opt/compaq/hpasm/etc/hpasm line 135 (echo -n/-e):
ARGS=`echo -n $CURRENTARGS | cut -d '|' -f $I`
possible bashism in /opt/compaq/hpasm/etc/hpasm line 149 (echo -n/-e):
TESTSTRING=`echo -n $CURRENTSUBS | fgrep $BASENAME`
possible bashism in /opt/compaq/utils/hpuid_example.sh line 18 (should be 'b = a'):
if [ $1 == "ON" ]
possible bashism in /opt/compaq/utils/hpuid_example.sh line 29 (should be 'b = a'):
if [ $1 == "OFF" ]
possible bashism in /opt/compaq/utils/hpuid_example.sh line 40 (should be 'b = a'):
if [ $1 == "STATUS" ]
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2008 07:43 AM
02-27-2008 07:43 AM
Re: Linux hpasm hpadu scripts call /bin/sh but use bash specific features.
As has been pointed out to me on a couple of occasions, this is "peer support" forum, and your request is likely to be better served with a direct submission to HP Support if you expect to get a response from HP.
I know "Linux is technically just kernel" - but the vast majority of distros consider the Linux default shell to be bash, and sym link sh as such.....
While your point has merit, I expect this will be something of "boiling the ocean" for HP to address...
Don
I know "Linux is technically just kernel" - but the vast majority of distros consider the Linux default shell to be bash, and sym link sh as such.....
While your point has merit, I expect this will be something of "boiling the ocean" for HP to address...
Don
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP