Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
b47c62be
Commit
b47c62be
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
If in amnesic mode put the log into its own tomb
parent
2f2b32e3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-image-mesh
+23
-24
23 additions, 24 deletions
src/freedombone-image-mesh
with
23 additions
and
24 deletions
src/freedombone-image-mesh
+
23
−
24
View file @
b47c62be
...
...
@@ -54,7 +54,9 @@ MESH_AMNESIC=/root/.amnesic
# size of the tomb used to store qtox settings
TOMB_TOX_SIZE_MB
=
64
TOMB_ZERONET_SIZE_MB
=
64
# Tomb containing logs
TOMB_LOG_SIZE_MB
=
32
function
create_ram_disk
{
ramdisk_size_mb
=
$1
...
...
@@ -535,16 +537,6 @@ function mesh_amnesic {
echo
''
>>
/usr/bin/amnesic
echo
'tomb slam all'
>>
/usr/bin/amnesic
echo
''
>>
/usr/bin/amnesic
echo
"if [ -d /home/
${
MY_USERNAME
}
/.config/tox ]; then"
>>
/usr/bin/amnesic
echo
" rm -rf /home/
${
MY_USERNAME
}
/.config/tox"
>>
/usr/bin/amnesic
echo
'fi'
>>
/usr/bin/amnesic
echo
''
>>
/usr/bin/amnesic
echo
'if [ -f /tmp/tox.tomb ]; then'
>>
/usr/bin/amnesic
echo
' rm -f /tmp/tox.tomb'
>>
/usr/bin/amnesic
echo
'fi'
>>
/usr/bin/amnesic
echo
''
>>
/usr/bin/amnesic
echo
"shred -zu /var/log/
${
PROJECT_NAME
}
*"
>>
/usr/bin/amnesic
echo
''
>>
/usr/bin/amnesic
echo
'MY_USERNAME=$1'
>>
/usr/bin/amnesic
echo
-n
"
${
PROJECT_NAME
}
-image-mesh "
>>
/usr/bin/amnesic
echo
'$MY_USERNAME amnesic'
>>
/usr/bin/amnesic
...
...
@@ -601,7 +593,24 @@ function create_tomb {
tomb open /tmp/
${
tomb_name
}
.tomb
-k
/mnt/ramdisk/
${
tomb_name
}
.tomb.key
--tomb-pwd
"
${
TOMB_TEMP_PASSWORD
}
"
--unsafe
# clear the temporary password
TOMB_TEMP_PASSWORD
=
}
function
setup_amnesic_data
{
if
[
!
-f
$MESH_AMNESIC
]
;
then
return
fi
if
[
!
-d
/mnt/ramdisk
]
;
then
return
fi
tomb_name
=
log
create_tomb
${
tomb_name
}
$TOMB_LOG_SIZE_MB
if
[
-d
/media/
${
tomb_name
}
]
;
then
INSTALL_LOG
=
/media/
${
tomb_name
}
/
${
PROJECT_NAME
}
.log
fi
tomb_name
=
tox
create_tomb
${
tomb_name
}
$TOMB_TOX_SIZE_MB
if
[
-d
/media/
${
tomb_name
}
]
;
then
if
[
!
-d
/home/
${
MY_USERNAME
}
/.config
]
;
then
mkdir
-p
/home/
${
MY_USERNAME
}
/.config
...
...
@@ -612,21 +621,11 @@ function create_tomb {
ln
-s
/media/
${
tomb_name
}
/home/
${
MY_USERNAME
}
/.config/
${
tomb_name
}
chown
-R
${
MY_USERNAME
}
:
${
MY_USERNAME
}
/home/
${
MY_USERNAME
}
/.config
chown
-R
${
MY_USERNAME
}
:
${
MY_USERNAME
}
/media/
${
tomb_name
}
echo
"
${
tomb_name
}
tomb created"
>>
/var/log/
${
PROJECT_NAME
}
.log
echo
"
${
tomb_name
}
tomb created"
>>
$INSTALL_LOG
else
echo
"WARNING:
${
tomb_name
}
tomb not found"
>>
/var/log/
${
PROJECT_NAME
}
.log
echo
"WARNING:
${
tomb_name
}
tomb not found"
>>
$INSTALL_LOG
fi
}
function
setup_amnesic_data
{
if
[
!
-f
$MESH_AMNESIC
]
;
then
return
fi
if
[
!
-d
/mnt/ramdisk
]
;
then
return
fi
create_tomb tox
$TOMB_TOX_SIZE_MB
}
# whether to reset the identity
...
...
@@ -668,13 +667,13 @@ if [ -f $MESH_INSTALL_SETUP ]; then
tomb slam all
enable_batman_daemon
create_ram_disk 1
setup_amnesic_data
change_avahi_name
regenerate_ssh_host_keys
configure_zeronet_blog
configure_zeronet_mail
configure_zeronet_forum
configure_zeronet_id
setup_amnesic_data
configure_toxcore
configure_zeronet
disable_password_logins
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment