Skip to content

Commit 632ebb1

Browse files
committed
Draft.
1 parent de808e8 commit 632ebb1

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

_prog/revert-live.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,30 @@ _revert-fromLive() {
6666

6767

6868

69+
70+
! "$scriptAbsoluteLocation" _openImage && _messagePlain_bad 'fail: _openImage' && _messageFAIL
71+
local imagedev
72+
imagedev=$(cat "$scriptLocal"/imagedev)
73+
74+
6975
_messageNormal 'os: globalVirtFS: write: fs'
7076

71-
echo "default" | sudo -n tee "$globalVirtFS"/etc/hostname
77+
local currentHostname
78+
currentHostname=$(cat "$globalVirtFS"/etc/hostname)
79+
80+
echo "$currentHostname" | sudo -n tee "$globalVirtFS"/etc/hostname
7281
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee "$globalVirtFS"/etc/hosts > /dev/null
7382
127.0.0.1 localhost
7483
::1 localhost ip6-localhost ip6-loopback
7584
ff02::1 ip6-allnodes
7685
ff02::2 ip6-allrouters
7786
78-
127.0.1.1 default
87+
127.0.1.1 $currentHostname
7988
8089
CZXWXcRMTo8EmM8i4d
8190

8291

83-
92+
! "$scriptAbsoluteLocation" _closeImage && _messagePlain_bad 'fail: _closeImage' && _messageFAIL
8493

8594

8695

ubiquitous_bash.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _ub_cksum_special_derivativeScripts_contents() {
3636
#export ub_setScriptChecksum_disable='true'
3737
( [[ -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'
3838
export ub_setScriptChecksum_header='2591634041'
39-
export ub_setScriptChecksum_contents='799333237'
39+
export ub_setScriptChecksum_contents='1308003098'
4040

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

4555745557

4555845558

45559+
45560+
! "$scriptAbsoluteLocation" _openImage && _messagePlain_bad 'fail: _openImage' && _messageFAIL
45561+
local imagedev
45562+
imagedev=$(cat "$scriptLocal"/imagedev)
45563+
45564+
4555945565
_messageNormal 'os: globalVirtFS: write: fs'
4556045566

45561-
echo "default" | sudo -n tee "$globalVirtFS"/etc/hostname
45567+
local currentHostname
45568+
currentHostname=$(cat "$globalVirtFS"/etc/hostname)
45569+
45570+
echo "$currentHostname" | sudo -n tee "$globalVirtFS"/etc/hostname
4556245571
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee "$globalVirtFS"/etc/hosts > /dev/null
4556345572
127.0.0.1 localhost
4556445573
::1 localhost ip6-localhost ip6-loopback
4556545574
ff02::1 ip6-allnodes
4556645575
ff02::2 ip6-allrouters
4556745576

45568-
127.0.1.1 default
45577+
127.0.1.1 $currentHostname
4556945578

4557045579
CZXWXcRMTo8EmM8i4d
4557145580

4557245581

45573-
45582+
! "$scriptAbsoluteLocation" _closeImage && _messagePlain_bad 'fail: _closeImage' && _messageFAIL
4557445583

4557545584

4557645585

0 commit comments

Comments
 (0)