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

remove legacy rename scripts #296

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions scripts/change-hostname-as-root.sh

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/change-hostname.sh

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/ratos-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,5 @@ pi ALL=(ALL) NOPASSWD: /home/pi/printer_data/config/RatOS/scripts/moonraker-upd
$sudo chown root:root /tmp/030-ratos-githooks
$sudo chmod 440 /tmp/030-ratos-githooks
$sudo cp --preserve=mode /tmp/030-ratos-githooks /etc/sudoers.d/030-ratos-githooks

# Whitelist change hostname script
if [[ ! -e /etc/sudoers.d/031-ratos-change-hostname ]]
then
touch /tmp/031-ratos-change-hostname
cat << '#EOF' > /tmp/031-ratos-change-hostname
pi ALL=(ALL) NOPASSWD: /home/pi/printer_data/config/RatOS/scripts/change-hostname-as-root.sh
#EOF

$sudo chown root:root /tmp/031-ratos-change-hostname
$sudo chmod 440 /tmp/031-ratos-change-hostname
$sudo cp --preserve=mode /tmp/031-ratos-change-hostname /etc/sudoers.d/031-ratos-change-hostname
fi
}

14 changes: 0 additions & 14 deletions shell-macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,3 @@ gcode:
command: /home/pi/printer_data/config/RatOS/scripts/generate-belt-tension-graph.sh
timeout: 90.
verbose: True

[gcode_macro CHANGE_HOSTNAME]
description: Change the hostname of your Raspberry Pi.
gcode:
{% if params.HOSTNAME is not defined %}
RATOS_ECHO MSG='You have to specify a new hostname with the HOSTNAME parameter. Ex: CHANGE_HOSTNAME HOSTNAME="MY_NEW_HOSTNAME"'
RATOS_ECHO MSG="Please note: RFCs mandate that a hostname's labels may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted."
{% else %}
RUN_SHELL_COMMAND CMD=change_hostname PARAMS={params.HOSTNAME}
{% endif %}

[gcode_shell_command change_hostname]
command: /home/pi/printer_data/config/RatOS/scripts/change-hostname.sh
timeout: 10.