Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
ce8a18b2
Commit
ce8a18b2
authored
Nov 16, 2011
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-apkcache: suggest /var/cache/apk as cache dir when not tmpfs root
parent
631c3616
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
setup-apkcache.in
setup-apkcache.in
+11
-0
No files found.
setup-apkcache.in
View file @
ce8a18b2
...
...
@@ -74,6 +74,13 @@ is_mounted_ro() {
return
1
}
# get the fstype of the given mount point
mount_fstype
()
{
# we only want the last mount in case there are several
awk
-v
mnt
=
"
$1
"
'$2 == "/" {fstype = mnt} END {print fstype}'
\
/proc/mounts
}
apk_cache_help
()
{
cat
<<
__EOF__
...
...
@@ -110,6 +117,10 @@ if [ -z "$suggestion" ] && [ -L /dev/usbdisk ]; then
suggestion
=
/media/usb/cache
fi
if
[
-z
"
$suggestion
"
]
&&
[
"
$(
mount_fstype /
)
"
!=
"tmpfs"
]
;
then
suggestion
=
/var/cache/apk
fi
if
[
-z
"
$suggestion
"
]
;
then
suggestion
=
none
fi
...
...
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