WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: foomatic-rip requires bash  (Read 2498 times)

Offline jpakko

  • Newbie
  • *
  • Posts: 7
foomatic-rip requires bash
« on: December 01, 2011, 01:20:20 AM »
Installing a printer using cups and foomatic took me quite a while. The problem was that by default, foomatic-rip tries to use /usr/bash, and I hadn't installed bash. So foomatic didn't work. It seems to work with ash just fine, so I see two solutions:
1. Make foomatic-rip depend on bash.
2. Repackage foomatic-rip so that looks for /usr/ash instead of /usr/bash.

I prefer the latter.

I did this:
Create a file /usr/local/etc/foomatic/filter.conf that reads:
      preferred_shell: /bin/ash
Put "usr/local/etc/foomatic/filter.conf" in /opt/.filetool.lst

This works fine.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: foomatic-rip requires bash
« Reply #1 on: December 01, 2011, 02:47:22 AM »
the problem was that by default, foomatic-rip tries to use /usr/bash, and I hadn't installed bash. So foomatic didn't work.

Ah - that one had slipped by me - thanks

Could you check if it will work with /bin/sh - I don't have any printer hardware that requires foomatic-rip

In the meantime I'll modify the package to read:
Code: [Select]
$ cat /usr/local/etc/foomatic/filter.conf
...
preferred_shell: /bin/ash
« Last Edit: December 01, 2011, 03:32:00 AM by Juanito »

Offline jpakko

  • Newbie
  • *
  • Posts: 7
Re: foomatic-rip requires bash
« Reply #2 on: December 01, 2011, 08:45:04 PM »
Yes, /bin/sh seems to work as well. Is sh different from ash? I see they're both symlinked to busybox.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: foomatic-rip requires bash
« Reply #3 on: December 01, 2011, 10:44:53 PM »
Well, '/bin/sh' and '/bin/ash' are AFAIK effectively identical applets provided by Busybox, BUT neither of them is a 'GNU bash' shell (but rather an Almquist shell).

OTOH fairly often when scripts are limiting themselves to not use "bashisms" (but rather stick to "plain old Bourne shell" code) they can run in Core without requiring the 'bash.tcz' extension (by just changing the shebang entry from '/bin/bash' to '/bin'sh'). Hence the suggestion to just give it a try.