General foo2zjs :  foo2zjs - foo2hp - foo2xqx - foo2lava - foo2qpdl - foo2oak
Support for linux printer drivers
The fastest message board... ever.
 
dash shell [solved: did not read the instructions]
Posted by: Rocdufer ()
Date: April 25, 2014 11:05PM

In relation with Debian Wheezy and next releases, and its derivatives like the latest Ubuntu releases,

it shold be noted that they use "dash" and not "bash" in order to process scripts.

The major problem when installing the foo2zjs in these OS distros appears to be that dash does not understand the script calling format «« ./ »» or sourcing.

In principle, one can reconfigure the static shell to have bash again, by using

dpkg-reconfigure dash

However, that did not work for me, it only modified the number of script lines reported as not executed for the script "modify-ppd".

In which follows, I will transcript a sequence fo command lines in a terminal and its results:
**************************************************

root@/foo/foo2zjs# echo $SHELL
/bin/bash

root@foo/foo2zjs# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 abr 23 22:43 /bin/sh -> dash

root@/foo/foo2zjs# getweb P1005
bash: getweb: command not found

root@/foo/foo2zjs# ./getweb P1005
bash: ./getweb: Permission denied

root@/foo/foo2zjs# sh getweb P1005
sihpP1005.img

(c) Copyright Hewlett-Packard 2009

**************************************************

So, even when bash is the dynamic shell for the terminal, the script ««getweb»» must be processed by the dash shell.

Same problem for the nested scripts.


References:

https://wiki.debian.org/Shell
https://wiki.ubuntu.com/DashAsBinSh



Edited 1 time(s). Last edit at 04/28/2014 07:26AM by rickrich.

Options: ReplyQuote
Re: dash shell
Posted by: rickrich ()
Date: April 26, 2014 01:24AM

$ yum list dash
Loaded plugins: langpacks, refresh-packagekit, verify
Installed Packages
dash.x86_64 0.5.7-5.fc19 @fedora

$ dash getweb p1005
sihpP1005.img

(c) Copyright Hewlett-Packard 2009

Works good here.

NOTE:

Logging in as "root" is a big security hole!

You should login as a normal user, then su/sudo only those commands that you need to be "root".

"getweb" does not need to be executed by root!!!


i.e.:
$ cd foo2zjs
$ make
$ ./getweb p1005
$ sudo make install



Edited 3 time(s). Last edit at 04/26/2014 05:30AM by rickrich.

Options: ReplyQuote
Re: dash shell
Posted by: rickrich ()
Date: April 26, 2014 03:33AM

On Ubuntu 14.04 LTS:

$ cat /etc/issue
Ubuntu 14.04 LTS \n \l

$ ll /bin/sh
lrwxrwxrwx 1 root root 4 Apr 26 01:00 /bin/sh -> dash*

$ ./getweb p1005
sihpP1005.img

(c) Copyright Hewlett-Packard 2009

Works here, too.

Options: ReplyQuote
Re: dash shell
Posted by: rickrich ()
Date: April 28, 2014 07:25AM

On Debian 7.5:

$ cat /etc/issue
Debian GNU/Linux 7 \n \l

$ ll /bin/sh
lrwxrwxrwx 1 root root 4 Mar  1  2012 /bin/sh -> dash

$ ./getweb p1005
sihpP1005.img

(c) Copyright Hewlett-Packard 2009

Works here, too.

Options: ReplyQuote
Re: dash shell
Posted by: Rocdufer ()
Date: April 28, 2014 04:28PM

Thank you for your fast answer.

Since I installed first from the repository, before discovering your site, may be something got mixed up in my system. I suspect after your answer two possible
reasons for getting a "permission denied". Either a path issue or a directory where "root" has not set up the right to write, but looks like a specific problem with my file system configuration.

I will try a fresh install.

Thank you again.

Options: ReplyQuote


Sorry, only registered users may post in this forum.
This forum powered by Phorum.