Skip to content

Commit

Permalink
Draft.
Browse files Browse the repository at this point in the history
  • Loading branch information
mirage335 committed Sep 11, 2023
1 parent de808e8 commit 632ebb1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
15 changes: 12 additions & 3 deletions _prog/revert-live.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,30 @@ _revert-fromLive() {




! "$scriptAbsoluteLocation" _openImage && _messagePlain_bad 'fail: _openImage' && _messageFAIL
local imagedev
imagedev=$(cat "$scriptLocal"/imagedev)


_messageNormal 'os: globalVirtFS: write: fs'

echo "default" | sudo -n tee "$globalVirtFS"/etc/hostname
local currentHostname
currentHostname=$(cat "$globalVirtFS"/etc/hostname)

echo "$currentHostname" | sudo -n tee "$globalVirtFS"/etc/hostname
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee "$globalVirtFS"/etc/hosts > /dev/null
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 default
127.0.1.1 $currentHostname
CZXWXcRMTo8EmM8i4d



! "$scriptAbsoluteLocation" _closeImage && _messagePlain_bad 'fail: _closeImage' && _messageFAIL



Expand Down
17 changes: 13 additions & 4 deletions ubiquitous_bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _ub_cksum_special_derivativeScripts_contents() {
#export ub_setScriptChecksum_disable='true'
( [[ -e "$0".nck ]] || [[ "${BASH_SOURCE[0]}" != "${0}" ]] || [[ "$1" == '--profile' ]] || [[ "$1" == '--script' ]] || [[ "$1" == '--call' ]] || [[ "$1" == '--return' ]] || [[ "$1" == '--devenv' ]] || [[ "$1" == '--shell' ]] || [[ "$1" == '--bypass' ]] || [[ "$1" == '--parent' ]] || [[ "$1" == '--embed' ]] || [[ "$1" == '--compressed' ]] || [[ "$0" == "/bin/bash" ]] || [[ "$0" == "-bash" ]] || [[ "$0" == "/usr/bin/bash" ]] || [[ "$0" == "bash" ]] ) && export ub_setScriptChecksum_disable='true'
export ub_setScriptChecksum_header='2591634041'
export ub_setScriptChecksum_contents='799333237'
export ub_setScriptChecksum_contents='1308003098'

# CAUTION: Symlinks may cause problems. Disable this test for such cases if necessary.
# WARNING: Performance may be crucial here.
Expand Down Expand Up @@ -45556,21 +45556,30 @@ _revert-fromLive() {




! "$scriptAbsoluteLocation" _openImage && _messagePlain_bad 'fail: _openImage' && _messageFAIL
local imagedev
imagedev=$(cat "$scriptLocal"/imagedev)


_messageNormal 'os: globalVirtFS: write: fs'

echo "default" | sudo -n tee "$globalVirtFS"/etc/hostname
local currentHostname
currentHostname=$(cat "$globalVirtFS"/etc/hostname)

echo "$currentHostname" | sudo -n tee "$globalVirtFS"/etc/hostname
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee "$globalVirtFS"/etc/hosts > /dev/null
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.1.1 default
127.0.1.1 $currentHostname

CZXWXcRMTo8EmM8i4d



! "$scriptAbsoluteLocation" _closeImage && _messagePlain_bad 'fail: _closeImage' && _messageFAIL



Expand Down

0 comments on commit 632ebb1

Please sign in to comment.