Skip to content

Commit

Permalink
reindent remount
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed Oct 17, 2024
1 parent 315a3d2 commit 4c02333
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions remount
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ BEGIN {
}
{
if ( $2 == "/" && $3 != "rootfs" ) {
if ( $4 == "ro" ) {
print "remounting rootfs as readwrite";
system("sudo -K");
system("set -x; sudo mount -t tmpfs tmpfs /var/lib/apt");
system("set -x; sudo mount -t tmpfs tmpfs /var/cache/apt");
system("set -x; sudo mount -o remount,rw /");
system("sudo -K");
}
if ( $4 == "rw" ) {
print "remounting rootfs as readonly";
system("sudo -K");
system("set -x; sudo mount -o remount,ro /");
system("sudo -K");
}
if ( $4 == "ro" ) {
print "remounting rootfs as readwrite";
system("sudo -K");
system("set -x; sudo mount -t tmpfs tmpfs /var/lib/apt");
system("set -x; sudo mount -t tmpfs tmpfs /var/cache/apt");
system("set -x; sudo mount -o remount,rw /");
system("sudo -K");
}
if ( $4 == "rw" ) {
print "remounting rootfs as readonly";
system("sudo -K");
system("set -x; sudo mount -o remount,ro /");
system("sudo -K");
}
}
}

0 comments on commit 4c02333

Please sign in to comment.