Fails on busybox #153

Closed
opened 2025-12-29 00:26:03 +01:00 by adam · 4 comments
Owner

Originally created by @paour on GitHub (Sep 21, 2016).

Busybox systems have an implementation of tr that doesn't support classes, so tr '[:upper:]' '[:lower:]' doesn't do what the script expects.

This stackexchange page lists some alternative implementation suitable for Busybox.

Originally created by @paour on GitHub (Sep 21, 2016). Busybox systems have an implementation of `tr` that doesn't support classes, so `tr '[:upper:]' '[:lower:]'` doesn't do what the script expects. [This stackexchange page](http://unix.stackexchange.com/a/136132) lists some alternative implementation suitable for Busybox.
adam closed this issue 2025-12-29 00:26:04 +01:00
Author
Owner

@paour commented on GitHub (Sep 21, 2016):

With this change and a deploy_cert hook to change the certs to DER format, dehydrated works fine on openwrt, thanks!

@paour commented on GitHub (Sep 21, 2016): With this change and a deploy_cert hook to change the certs to DER format, dehydrated works fine on openwrt, thanks!
Author
Owner

@lukas2511 commented on GitHub (Sep 29, 2016):

Interesting, I'll have a look at this, would be cool to have support on some embedded devices.

@lukas2511 commented on GitHub (Sep 29, 2016): Interesting, I'll have a look at this, would be cool to have support on some embedded devices.
Author
Owner

@abelbeck commented on GitHub (Dec 23, 2016):

@paour with our somewhat old BusyBox v1.19.4 this works:

# echo 'RoadRunner' | tr '[:upper:]' '[:lower:]'
roadrunner

There is a BusyBox configuration option:

CONFIG_FEATURE_TR_CLASSES=y
config FEATURE_TR_CLASSES
   bool "Enable character classes (such as [:upper:])"
   default y
   depends on TR
   help
     Enable character classes, enabling commands such as:
     tr [:upper:] [:lower:] to convert input into lowercase.

@lukas2511 Though using Busybox the -u option for mktemp is not supported, this solves the test for mktemp:

-   _mktemp -u > /dev/null 2>&1 || _exiterr "This script requires mktemp."
+   which mktemp > /dev/null 2>&1 || _exiterr "This script requires mktemp."

Possibly you could use which to test for all command dependencies.

@abelbeck commented on GitHub (Dec 23, 2016): @paour with our somewhat old BusyBox v1.19.4 this works: ``` # echo 'RoadRunner' | tr '[:upper:]' '[:lower:]' roadrunner ``` There is a BusyBox configuration option: ``` CONFIG_FEATURE_TR_CLASSES=y ``` ``` config FEATURE_TR_CLASSES bool "Enable character classes (such as [:upper:])" default y depends on TR help Enable character classes, enabling commands such as: tr [:upper:] [:lower:] to convert input into lowercase. ``` @lukas2511 Though using Busybox the ```-u``` option for ```mktemp``` is not supported, this solves the test for mktemp: ``` - _mktemp -u > /dev/null 2>&1 || _exiterr "This script requires mktemp." + which mktemp > /dev/null 2>&1 || _exiterr "This script requires mktemp." ``` Possibly you could use ```which``` to test for all command dependencies.
Author
Owner

@lukas2511 commented on GitHub (Jan 29, 2017):

I just pushed a few changes and dehydrated now works fine under OpenWrt after installing bash, openssl-util and diffutils.

@lukas2511 commented on GitHub (Jan 29, 2017): I just pushed a few changes and dehydrated now works fine under OpenWrt after installing bash, openssl-util and diffutils.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#153