Remove vers 1.0 and restart mounts at session open

parent 22b133f6
......@@ -34,8 +34,8 @@ do
fi
lvlcred=$(echo "$lvl" | awk '{print tolower($0)}')
cat <<EOF>>/etc/fstab
//ecole-dc/$lvl2/donnees /home/shares/$usr/PROFESSEURS/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/$lvlcred,uid=$usr,gid=$usr 0 0
//ecole-dc/$lvl2/travail /home/shares/$usr/ELEVES/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/$lvlcred,uid=$usr,gid=$usr 0 0
//ecole-dc/$lvl2/donnees /home/shares/$usr/PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/$lvlcred,uid=$usr,gid=$usr 0 0
//ecole-dc/$lvl2/travail /home/shares/$usr/ELEVES/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/$lvlcred,uid=$usr,gid=$usr 0 0
EOF
done
# profs
......@@ -49,13 +49,13 @@ do
lvl=`echo $classe | sed 's/^[0-9]*-//'`
# Should not be prof-cp
cat <<EOF>>/etc/fstab
//ecole-dc/profs-$lvl/classe/donnees /home/shares/$usr/$classe/PROFESSEURS/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/profs-$lvl/classe/travail /home/shares/$usr/$classe/ELEVES/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/profs-$lvl/classe/donnees /home/shares/$usr/$classe/PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/profs-$lvl/classe/travail /home/shares/$usr/$classe/ELEVES/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
EOF
done
chown -R $usr:$usr /home/shares/$usr
cat <<EOF>>/etc/fstab
//ecole-dc/SCAN /home/shares/$usr/SCAN/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/SCAN /home/shares/$usr/SCAN/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
EOF
done
......@@ -64,9 +64,9 @@ mkdir -p /home/shares/prof/CONFIDENTIEL
mkdir -p /home/shares/direction/CONFIDENTIEL_PROFESSEURS
mkdir -p /home/shares/direction/CONFIDENTIEL_DIRECTION
cat <<EOF>>/etc/fstab
//ecole-dc/svc-prof/perso /home/shares/prof/CONFIDENTIEL/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=prof,gid=prof 0 0
//ecole-dc/svc-prof/perso /home/shares/direction/CONFIDENTIEL_PROFESSEURS/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=direction,gid=direction 0 0
//ecole-dc/svc-dir/perso /home/shares/direction/CONFIDENTIEL_DIRECTION/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/dir,uid=direction,gid=direction 0 0
//ecole-dc/svc-prof/perso /home/shares/prof/CONFIDENTIEL/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=prof,gid=prof 0 0
//ecole-dc/svc-prof/perso /home/shares/direction/CONFIDENTIEL_PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=direction,gid=direction 0 0
//ecole-dc/svc-dir/perso /home/shares/direction/CONFIDENTIEL_DIRECTION/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/dir,uid=direction,gid=direction 0 0
EOF
cp `dirname $0`/mount_shares.service /etc/systemd/system/
......
......@@ -7,10 +7,13 @@ do
sleep 10
done
#[ `grep -c '^//ecole-dc/' /etc/mtab` -gt 0 ] && exit 0
awk '/^\/\/ecole-dc/{print $2}' /etc/fstab | \
awk '/^\/\/ecole-dc/{print $2}' /etc/mtab | \
while read dest
do
umount -f $dest
done
awk '/^\/\/ecole-dc/{print $2}' /etc/fstab | \
while read dest
do
mount $dest
done
......@@ -5,6 +5,8 @@ SCOPE2=CE1-CE2
SCOPE3=CM1-CM2
SHARE_DIR="/home/shares/$USER"
/opt/primtux-eole/mount_shares.sh
# unmute sound
pactl set-sink-mute 0 0
/opt/primtux-eole/pactl_watch.sh &
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment