-
Notifications
You must be signed in to change notification settings - Fork 3.9k
nut: rewrite scripts #29607
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
Draft
danielfdickinson
wants to merge
7
commits into
openwrt:master
Choose a base branch
from
danielfdickinson:pr-nut-refactor-and-bump-version
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
nut: rewrite scripts #29607
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ea49955
nut: bump to 2.8.5
danielfdickinson 2ec1ddf
nut: move drivers to libexec
danielfdickinson 66a1b71
nut: bump OpenWrt copyright for files with it
danielfdickinson 331168a
nut: add version test overrides
danielfdickinson cb7a26a
nut: belatedly add migration for nut-monitor changes
danielfdickinson f59aa50
nut: fix quoting bug for ups stop and reload
danielfdickinson e761068
nut: rewrite scripts
danielfdickinson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/bin/sh | ||
|
|
||
| # UCI default script to set default password to access the NUT CGI pages | ||
| # to be the system password for the root user (as with LuCI) | ||
|
|
||
| # $p$root is not an actual password, it is a reference to the password | ||
| # for root in the system password (/etc/shadow) password file | ||
|
|
||
| # In recent (relevant) versions of shellcheck busybox is a valid shell type | ||
| # shellcheck shell=busybox | ||
|
|
||
| # Only add this default user:password (reference) for NUT CGI if there is | ||
| # not an existing password configuration for the NUT CGI, include for other | ||
| # users. | ||
|
|
||
| [ -z "$IPKG_ROOT" ] || exit 0 | ||
|
|
||
| touch /etc/httpd.conf | ||
| grep -q '^/cgi-bin/nut' /etc/httpd.conf 2>/dev/null || { | ||
| # The SC2016 shellcheck directive is required as shellcheck thinks the | ||
| # $p$root is a variable that gets expanded | ||
| # shellcheck disable=SC2016 | ||
| echo '/cgi-bin/nut:root:$p$root' >>/etc/httpd.conf | ||
| if ! /etc/init.d/uhttpd restart; then | ||
| logger -s -t nut-cgi "Failed to restart uhttpd after http.conf update" | ||
| fi | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.