-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make it easier to keep the filesystem read-only when possible
- Loading branch information
Showing
4 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,10 @@ ssh [email protected] "cd /root/doorjam; ./grant_access_to_last_attempt.js <name | |
|
||
You can also use the sudo_grant_access.sh script, but you should edit it to suit your environment. | ||
|
||
change /etc/bash.bashrc to remind you when the filesystem is not read-only: | ||
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | ||
PS1='${debian_chroot:+($debian_chroot)}\u@\h`if grep "ec2c7555affb / ext4 rw" /proc/mounts > /dev/null; then echo \ FILESYSTEM IS WRITABLE, RUN roroot TO FIX; fi`:\w\$ ' | ||
|
||
# License and copyright | ||
|
||
GPLv3+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if grep "ec2c7555affb / ext4 ro" /proc/mounts > /dev/null; then | ||
rwroot | ||
vim /root/doorjam/access_control_list | ||
roroot | ||
else | ||
vim /root/doorjam/access_control_list | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
echo SETTING FILESYSTEM TO READ-ONLY | ||
sync | ||
mount -o remount,ro / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
echo SETTING FILESYSTEM TO READ-WRITE | ||
mount -o remount,rw / |