elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
elkscmd
/
rootfs_template
/
bin
/
setup
File editor
# # Quick configure /bootopts and /etc/hosts files # # Usage: setup node_number [bootopts_enable_string] # sets last digits of LOCALIP and HOSTNAME to node_number # uncomment matching /bootopts lines # # defaults network=10.0.2 bootopts=/bootopts hosts=/etc/hosts # 1st arg is node number if test "$#" -lt 1; then echo "Usage: setup node_number [bootops_enable_string]" echo cat $bootopts cat $hosts exit 0 fi id=$1 # 2nd arg matchstr match_str=SEDNOMATCH if test "$#" -ge 2; then match_str=$2; fi # template strings hostname=elks$id localip=$network.$id gateway=$network.2 # rewrite /bootopts sed -e "s/.*LOCALIP=.*/LOCALIP=$localip/" -e "s/.*HOSTNAME=.*/HOSTNAME=$hostname/" \ -e "s/#\(.*$match_str.*\)/\1/" < $bootopts > /tmp/bootopts mv /tmp/bootopts $bootopts # rewrite /etc/hosts cat << EOF > $hosts #127.0.0.1 localhost $network.$id elks$id $network.15 elks15 $network.16 elks16 $network.17 elks17 $gateway gateway EOF # display results cat $bootopts cat $hosts sync
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history