Skip to content

Commit

Permalink
update cross mount setup script to include emmons
Browse files Browse the repository at this point in the history
  • Loading branch information
markusgrotz committed Sep 27, 2023
1 parent b0a3a45 commit bd42ad5
Showing 1 changed file with 28 additions and 13 deletions.
41 changes: 28 additions & 13 deletions system_scripts/40_setup_cross_mounts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,36 @@ sudo chown $USER /workspaces

static_hostname=$(hostnamectl status --static)

if [[ $static_hostname == "aurmr-perception" ]]; then
OTHER_HOST=control
THIS_HOST=perception
ln -s /home/aurmr/workspaces /workspaces/perception
mkdir /workspaces/control
if [[ $static_hostname == "emmons" ]]; then
ln -s /home/aurmr/workspaces /workspaces/emmons
mkdir /workspaces/winthrop
mkdir /workspaces/inter

cat | sudo tee -a /etc/fstab <<EOF
aurmr@winthrop:/home/aurmr/workspaces/ /workspaces/winthrop/ fuse.sshfs x-systemd.automount,_netdev,user,exec,transform_symlinks,identityfile=/home/aurmr/.ssh/id_rsa,allow_other,default_permissions,uid=aurmr,gid=aurmr 0 0
aurmr@inter:/home/aurmr/workspaces/ /workspaces/inter/ fuse.sshfs x-systemd.automount,_netdev,user,exec,transform_symlinks,identityfile=/home/aurmr/.ssh/id_rsa,allow_other,default_permissions,uid=aurmr,gid=aurmr 0 0
EOF
fi
if [[ $static_hostname == "aurmr-control" ]]; then
OTHER_HOST=perception
THIS_HOST=control
ln -s /home/aurmr/workspaces /workspaces/control
mkdir workspaces/perception
if [[ $static_hostname == "winthrop" ]]; then
ln -s /home/aurmr/workspaces /workspaces/winthrop
mkdir workspaces/emmons
mkdir workspaces/inter
cat | sudo tee -a /etc/fstab <<EOF
aurmr@emmons:/home/aurmr/workspaces/ /workspaces/emmons/ fuse.sshfs x-systemd.automount,_netdev,user,exec,transform_symlinks,identityfile=/home/aurmr/.ssh/id_rsa,allow_other,default_permissions,uid=aurmr,gid=aurmr 0 0
aurmr@inter:/home/aurmr/workspaces/ /workspaces/inter/ fuse.sshfs x-systemd.automount,_netdev,user,exec,transform_symlinks,identityfile=/home/aurmr/.ssh/id_rsa,allow_other,default_permissions,uid=aurmr,gid=aurmr 0 0
EOF
fi


if [[ $static_hostname == "inter" ]]; then
ln -s /home/aurmr/workspaces /workspaces/inter
mkdir workspaces/winthrop
mkdir workspaces/emmons
cat | sudo tee -a /etc/fstab <<EOF
aurmr@${OTHER_HOST}:/home/aurmr/workspaces/ /workspaces/$OTHER_HOST/ fuse.sshfs x-systemd.automount,_netdev,user,exec,transform_symlinks,identityfile=/home/aurmr/.ssh/id_rsa,allow_other,default_permissions,uid=aurmr,gid=aurmr 0 0
aurmr@emmons:/home/aurmr/workspaces/ /workspaces/emmons/ fuse.sshfs x-systemd.automount,_netdev,user,exec,transform_symlinks,identityfile=/home/aurmr/.ssh/id_rsa,allow_other,default_permissions,uid=aurmr,gid=aurmr 0 0
aurmr@winthrop:/home/aurmr/workspaces/ /workspaces/winthrop/ fuse.sshfs x-systemd.automount,_netdev,user,exec,transform_symlinks,identityfile=/home/aurmr/.ssh/id_rsa,allow_other,default_permissions,uid=aurmr,gid=aurmr 0 0
EOF
fi





0 comments on commit bd42ad5

Please sign in to comment.