Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ev3-toolbox-matlab
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mindstorms
ev3-toolbox-matlab
Commits
831e99e6
Commit
831e99e6
authored
8 years ago
by
Christian Rohlfing
Browse files
Options
Downloads
Patches
Plain Diff
Update rc.local.sh
parent
a34ebf7f
No related branches found
No related tags found
1 merge request
!2
Develop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/rc.local.sh
+20
-7
20 additions, 7 deletions
tools/rc.local.sh
with
20 additions
and
7 deletions
tools/rc.local.sh
+
20
−
7
View file @
831e99e6
...
...
@@ -116,6 +116,26 @@ for SWP in /mnt/localfs/*/mindstorms.swp; do
swapon
"
$SWP
"
done
# Remove work directory if not mounted
if
!
mountpoint
-q
/home/mindstorms/work
;
then
echo
"Removing work directory as no available mountpoint found."
rm
-rf
/home/mindstorms/work
fi
# Try to find mindstorms.startup directory (also on boot medium) which should include hook.sh
echo
"Looking for mindstorms.startup directory (also on boot medium) which should include hook.sh ..."
for
DIR
in
/cdrom/mindstorms.startup /mnt/localfs/
*
/mindstorms.startup
;
do
[
-d
"
$DIR
"
]
||
continue
echo
"Found mindstorms.startup.dir at
${
DIR
}
. Searching for hook.sh ..."
if
[
!
-f
"
$DIR
/hook.sh"
]
;
then
echo
"File not found!"
&&
continue
fi
# Execute hook as mindstorms user
su - mindstorms
$DIR
/hook.sh
&&
break
done
# Try to unmount all unused partitions
echo
"Unmounting all unused partitions ..."
for
PART
in
/mnt/localfs/
*
;
do
...
...
@@ -123,12 +143,6 @@ for PART in /mnt/localfs/*; do
umount
"
$PART
"
2>/dev/null
done
# Remove work directory if not mounted
if
!
mountpoint
-q
/home/mindstorms/work
;
then
echo
"Removing work directory as no available mountpoint found."
rm
-rf
/home/mindstorms/work
fi
# HACK: re-enable gnome's automount functionality.
echo
"Re-enabling gnome's automount functionality ..."
su - mindstorms
-c
"dbus-launch --exit-with-session gsettings set org.gnome.desktop.media-handling automount 'true'"
...
...
@@ -159,4 +173,3 @@ chmod +x /home/mindstorms/Desktop/matlab.desktop
sudo chown
mindstorms:mindstorms /home/mindstorms/Desktop/matlab.desktop
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment