Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"/etc/default/<package-name>" should be shell script setting envars #472

Closed
dhardy92 opened this issue Jan 27, 2015 · 7 comments
Closed

Comments

@dhardy92
Copy link
Contributor

Current format is java option only append to java command line.
This is not standards and not very flexible and expendable.
Shell let us include other source and split config in several files and responsibilities using source
Moreover, envars usage is a 12-factors app recommendation.

@kardapoltsev
Copy link
Member

From Debian Policy Manual

Often there are some variables in the init.d scripts whose values control the behavior of the scripts, and which a system administrator is likely to want to change. As the scripts themselves are frequently conffiles, modifying them requires that the administrator merge in their changes each time the package is upgraded and the conffile changes. To ease the burden on the system administrator, such configurable values should not be placed directly in the script. Instead, they should be placed in a file in /etc/default, which typically will have the same base name as the init.d script. This extra file should be sourced by the script when the script runs. It must contain only variable settings and comments in SUSv3 sh format. It may either be a conffile or a configuration file maintained by the package maintainer scripts.

@kardapoltsev
Copy link
Member

Hmm.. Seems that during refactoring we missed this. We should source /etc/default/app_name in init script.

@kardapoltsev
Copy link
Member

@dhardy92, PR is welcome!

@muuki88 muuki88 closed this as completed in 520ffaf Feb 4, 2015
muuki88 added a commit that referenced this issue Feb 4, 2015
[fix #472] /etc/default/<package-name> should be shell script setting envars
muuki88 added a commit that referenced this issue Feb 13, 2015
muuki88 added a commit that referenced this issue Feb 13, 2015
Revert "[fix #472] /etc/default/<package-name> should be shell script se...
metasim pushed a commit to metasim/sbt-native-packager that referenced this issue Feb 15, 2015
* master:
  Update README.md
  Replace chmod call
  More comprehensive tests
  Adding documentation
  FIX sbt#276 creating directories as necessary and specify top level dir and sadly realizing that apache commons compress is still the best bet
  Adding documentation, examples and tests.
  Initial refactoring on sbt#453
  Revert "[fix sbt#472] /etc/default/<package-name> should be shell script setting envars"
  FIX sbt#489: Small fix in documentation
  Upgrading to java 7 and using posix nio API

Conflicts:
	src/main/scala/com/typesafe/sbt/packager/jdkpackager/JDKPackagerHelper.scala
@knshiro
Copy link

knshiro commented Feb 25, 2015

Hello everyone, why was this reverted?
I had to modify my build.sbt to add lines to the bash script to be able to use environment variables and was happy to see that was put in the plugin...

@kardapoltsev
Copy link
Member

See #491

@jasonmartens
Copy link

This bug should be re-opened, since the /etc/default/ script is still not getting sourced.

@muuki88
Copy link
Contributor

muuki88 commented Aug 20, 2015

@jasonmartens can you open a new issue with a small sample project demonstrating the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants