Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Primtux-Eole
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Grenoble
Primtux-Eole
Commits
3dc2893e
Unverified
Commit
3dc2893e
authored
Mar 06, 2019
by
David Beniamine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate fix for #18 and #21
parent
827dc6d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
create_cifs_mounts.sh
create_cifs_mounts.sh
+14
-6
session.sh
session.sh
+4
-2
upgrade-session.sh
upgrade-session.sh
+1
-0
No files found.
create_cifs_mounts.sh
View file @
3dc2893e
...
...
@@ -5,12 +5,19 @@ then
apt-get
-y
install
cifs-utils smbclient
fi
for
d
in
/home/shares/
*
/
*
do
umount
$d
>
/dev/null 2>&1
||
umount
$d
/
*
>
/dev/null 2>&1
rmdir
$d
/
*
>
/dev/null 2>&1
rmdir
$d
>
/dev/null 2>&1
done
# Remove all ^//ecole-dc lines in fstab
sed
-i
.bak
'/^\/\/ecole-dc/d'
/etc/fstab
declare
-A
LEVELS
LEVELS
=([
'01-mini'
]=
'
cp'
[
'02-super'
]=
'ce'
[
'03-maxi'
]=
'cm
'
)
CLASSES
=([
'01-mini'
]=
'01-
cp'
[
'02-super'
]=
'02-ce1-ce2'
[
'03-maxi'
]=
'03-cm1-cm
2'
)
LEVELS
=([
'01-mini'
]=
'
CP'
[
'02-super'
]=
'CE'
[
'03-maxi'
]=
'CM
'
)
CLASSES
=([
'01-mini'
]=
'01-
CP'
[
'02-super'
]=
'02-CE1-CE2'
[
'03-maxi'
]=
'03-CM1-CM
2'
)
# Students
for
usr
in
01-mini 02-super 03-maxi
...
...
@@ -19,22 +26,23 @@ do
mkdir
-p
/home/shares/
$usr
/PROFESSEURS
chown
-R
$usr
:
$usr
/home/shares/
$usr
lvl
=
${
LEVELS
[
$usr
]
}
if
[
$lvl
!=
'
cp
'
]
if
[
$lvl
!=
'
CP
'
]
then
lvl2
=
"
${
lvl
}
1-
${
lvl
}
2"
else
lvl2
=
$lvl
fi
lvlcred
=
$(
echo
"
$lvl
"
|
awk
'{print tolower($0)}'
)
cat
<<
EOF
>>/etc/fstab
//ecole-dc/
$lvl2
/donnees /home/shares/
$usr
/PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/
$lvl
,uid=
$usr
,gid=
$usr
0 0
//ecole-dc/
$lvl2
/travail /home/shares/
$usr
/ELEVES/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/
$lvl
,uid=
$usr
,gid=
$usr
0 0
//ecole-dc/
$lvl2
/donnees /home/shares/
$usr
/PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/
$lvl
cred
,uid=
$usr
,gid=
$usr
0 0
//ecole-dc/
$lvl2
/travail /home/shares/
$usr
/ELEVES/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/
$lvl
cred
,uid=
$usr
,gid=
$usr
0 0
EOF
done
# profs
for
usr
in
prof direction
do
mkdir
-p
/home/shares/
$usr
/SCAN
for
classe
in
01-
cp 02-ce1-ce2 03-cm1-cm
2
for
classe
in
01-
CP 02-CE1-CE2 03-CM1-CM
2
do
mkdir
-p
/home/shares/
$usr
/
$classe
/PROFESSEURS
mkdir
-p
/home/shares/
$usr
/
$classe
/ELEVES
...
...
session.sh
View file @
3dc2893e
...
...
@@ -13,7 +13,9 @@ do
rm
$HOME
/Documents/
$d
/
{
ELEVES,PROFESSEURS
}
>
/dev/null 2>&1
rmdir
$HOME
/Documents/
$d
>
/dev/null 2>&1
done
rm
$HOME
/Documents/SCAN
$HOME
/Documents/CONFIDENTIEL
>
/dev/null 2>&1
rm
$HOME
/Documents/SCAN
$HOME
/Documents/CONFIDENTIEL
\
$HOME
/Documents/CONFIDENTIEL_DIRECTION
\
$HOME
/Documents/CONFIDENTIEL_PROFESSEURS
>
/dev/null 2>&1
mkdir
-p
$HOME
/.config/gtk-3.0
...
...
@@ -65,4 +67,4 @@ case "$USER" in
echo
file://
$DOCUMENTS
/CONFIDENTIEL_DIRECTION CONFIDENTIEL_DIRECTION
>>
$HOME
/.config/gtk-3.0/bookmarks
echo
file://
$DOCUMENTS
/CONFIDENTIEL_PROFESSEURS CONFIDENTIEL_PROFESSEURS
>>
$HOME
/.config/gtk-3.0/bookmarks
;;
esac
\ No newline at end of file
esac
upgrade-session.sh
View file @
3dc2893e
...
...
@@ -34,6 +34,7 @@ $DIR/create_cifs_mounts.sh
$DIR
/set_mime_apps.sh
$DIR
/set_screens.sh
$DIR
/install_print_drivers.sh
$DIR
/fix_libreoffice.sh
$DIR
/install_vnc.sh
# Install missing libreoffice gtk
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment