Skip to content

Loading…

use /bin/bash due used bash constructs #461

Closed
wants to merge 1 commit into from

3 participants

@glensc

echo -n $"" is so called "bashism"

@glensc glensc use /bin/bash due used bash constructs
echo -n $"" is so called "bashism"
8e79ff0
@cobbler-jenkins

Can one of the admins verify this patch?

@jimi-c
Cobbler member

On Red Hat-centric systems, /bin/sh is a symlink to /bin/bash:

# ls -l /bin/sh
lrwxrwxrwx. 1 root root 4 Mar 23 09:57 /bin/sh -> bash

I have concerns that this would break things on other systems like Ubuntu where that may not be the case and bash would need to be installed as a requirement (/bin/sh links to dash on ubuntu, and bash is not necessarily installed by default).

in that case, port the script not to use any bash specific extensions, use pure POSIX

Cobbler member

I think that's the better way to go, since according to some research the behavior that $"" creates is also the default behavior for bash.

@jimi-c jimi-c added a commit to jimi-c/cobbler that referenced this pull request
@jimi-c jimi-c FEATURE - adding ability to grab templated scripts
* Moved scripts/ directory to bin/, since those are all pre-packaged
  executable scripts and /usr/bin is mainly where they go
* Added new scripts/ directory, which will go into /var/lib/cobbler
  alongside kickstarts and snippets. This contains the first script
  for running preseed late-commands.
* Modified sample.seed to call that script
* Modified a few snippets to make them work better with debian/
  ubuntu when using the new templated script functionality
* Minor fix to init script (config/cobblerd) to not use bash-specific
  language constructs, per pull request #461.
955568d
@jimi-c
Cobbler member

I threw that fix in with the above pull request. Feel free to send me more if you find anything else that's bash-specific in that config.

Thanks!

@jimi-c jimi-c closed this
@glensc glensc deleted the glensc:patch-1 branch
@jimi-c jimi-c added a commit that referenced this pull request
@jimi-c jimi-c FEATURE - adding ability to grab templated scripts
* Moved scripts/ directory to bin/, since those are all pre-packaged
  executable scripts and /usr/bin is mainly where they go
* Added new scripts/ directory, which will go into /var/lib/cobbler
  alongside kickstarts and snippets. This contains the first script
  for running preseed late-commands.
* Modified sample.seed to call that script
* Modified a few snippets to make them work better with debian/
  ubuntu when using the new templated script functionality
* Minor fix to init script (config/cobblerd) to not use bash-specific
  language constructs, per pull request #461.
1477c49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 8, 2013
  1. @glensc

    use /bin/bash due used bash constructs

    glensc committed
    echo -n $"" is so called "bashism"
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 config/cobblerd
View
2 config/cobblerd
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# cobblerd Cobbler helper daemon
###################################
Something went wrong with that request. Please try again.