command-not-found weird behavior in bash

Bug #103331 reported by Jurriaan
62
This bug affects 13 people
Affects Status Importance Assigned to Milestone
command-not-found
Fix Released
Low
lehung2112
command-not-found (Ubuntu)
Fix Released
Low
lehung2112

Bug Description

Binary package hint: command-not-found

jurp5@jurp5-desktop:~$ --help
Usage: command-not-found [opties] <commando naam>

Options:
  --version show program's version number and exit
  -h, --help show this help message and exit
  -d DATA_DIR, --data-dir=DATA_DIR
                        gebruik dit pad om data velden te vinden
bash: --help: command not found
jurp5@jurp5-desktop:~$ --version
0.2
bash: --version: command not found

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Affects only bash. Caused by missing -- in cnf invocation in helper script.

Changed in command-not-found:
assignee: nobody → zkrynicki
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Fixed in trunk. See ubuntu 7.04 release for details

Changed in command-not-found:
assignee: nobody → zkrynicki
importance: Undecided → Low
status: Unconfirmed → Fix Released
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Fixed with the update to 0.2.4

Changed in command-not-found:
status: Confirmed → Fix Released
Revision history for this message
cmnorton (octopusgrabbus) wrote :

Is this bug the same as what I am experiencing?

Any workaround suggestions would be greatly appreciated. I have included the case statement that is failing and attached the full script. sqlexecd used to run on 6.06 Ubuntu, and does (modified for server name, etc) run on rpm-based systems, Fedora, Red Hat 9, and RH EL 3/4.

The server it runs on is now @ Feisty level.

Here is the error:
root@linux-testU:/etc/init.d# ./sqlexecd start
./sqlexecd: 125: action: not found
root@linux-testU:/etc/init.d#

As far as I can tell, the syntax is good. Line 125 is the esac.

# See how we were called.
case "$1" in
     start)
          start
          ;;
     stop)
          stop
          ;;
     status)
          status ${process}
          ;;
     restart)
          restart
          ;;
     condrestart)
          condrestart
          ;;
     *)
          echo $"Usage: $0 {start|stop|status|condrestart|restart}"
          exit 1
esac

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Does running the script mentioned above with bash (as opposed to plain sh) explicitly affects the problem?

Could you change #!/bin/sh to #!/bin/bash and try again?

Revision history for this message
cmnorton (octopusgrabbus) wrote :

I still get the error after changing
#!/bin/sh to #! /bin/bash,

but look it works

(sqlexecd was not running prior)

stop also works.

root@linux-testU:/etc/init.d# ./sqlexecd start
./sqlexecd: line 52: action: command not found
root@linux-testU:/etc/init.d# ps -ef | grep sqlexec
root 19631 1 0 08:41 pts/0 00:00:00 /usr/share/informix/lib/sqlexecd linux-testU -l /var/log/sqlexecd.log

Revision history for this message
lehung2112 (lehung2112) wrote :

i'm not fix problem : command not found version 0.2.44 help me

Changed in command-not-found:
assignee: Zygmunt Krynicki (zkrynicki) → lehung2112 (lehung2112)
Changed in command-not-found (Ubuntu):
assignee: Zygmunt Krynicki (zkrynicki) → lehung2112 (lehung2112)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.