Please read Script Templates section in Lighthouse manual https://ftp.opengear.com/download/documentation/manual/current/lighthouse/ and the following article as it explains Script Templates usage, how to upload and apply to specific nodes.
https://opengear.zendesk.com/hc/en-us/articles/115004747366-Configuration-Templating-on-Lighthouse-5
Note: Use the freely available Notepad++ which allows you to save the script with Unix (LF) line endings, not DOS (CRLF) line endings. Ensure any 'single' and "double" quotation marks have not been converted into curly “smart quotes”. Applying scripts with DOS (CRLF) line endings will break node configuration.
To enable Message Of The Day:
Edit the example motd-enable.sh file. The message text is added between the EOF string.
The second part of this script sets a custom login prompt.
#!/bin/bash
# Add the message text between the EOF string
cat >/etc/config/motd << 'EOF'
*******************************
Welcome to Opengear Demo Unit 1
*******************************
EOF
# hostname can be set in System > Administration.
# Set a custom prompt username@hostname instead of the standard # or $ prompt
cat >/etc/config/profile << 'EOF'
export PS1='[\u@\h]\$ '
EOF
chmod +x /etc/config/profile
To disable Message Of The Day:
The command deletes the motd file.
#!/bin/bash
# Remove MOTD file
rm /etc/config/motd
The commands can be copied and pasted directly on the Console Server CLI or saved in a file (attached) and deployed via Lighthouse Script Template.
Comments
0 comments
Article is closed for comments.