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
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
bad905a4
Commit
bad905a4
authored
Apr 23, 2014
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-lbu: improve $ROOT support
parent
c6d3753d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
setup-lbu.in
setup-lbu.in
+15
-6
No files found.
setup-lbu.in
View file @
bad905a4
...
...
@@ -57,16 +57,25 @@ set_media() {
mnt
=
"
$media
"
media
=
${
mnt
#/media/
}
fi
if
!
[
-d
"
$mnt
"
]
;
then
if
[
"
$ROOT
"
=
"/"
]
&&
!
[
-d
"
$mnt
"
]
;
then
echo
"
$mnt
: not a directory"
>
&2
exit
1
fi
# set LBU_MEDIA in /etc/lbu/lbu.conf
sed
-i
-e
"/^
\#\?
[[:space:]]*LBU_MEDIA=.*/s/.*/LBU_MEDIA=
$media
/"
\
/etc/lbu/lbu.conf
if
!
egrep
-q
'^LBU_MEDIA='
/etc/lbu/lbu.conf
;
then
echo
"LBU_MEDIA=
$media
"
>>
/etc/lbu/lbu.conf
if
[
-f
"
${
ROOT
}
"
etc/lbu/lbu.conf
]
;
then
sed
-e
"/^
\#\?
[[:space:]]*LBU_MEDIA=.*/s/.*/LBU_MEDIA=
$media
/"
\
-i
"
${
ROOT
}
"
etc/lbu/lbu.conf
if
!
egrep
-q
'^LBU_MEDIA='
"
${
ROOT
}
"
etc/lbu/lbu.conf
;
then
echo
"LBU_MEDIA=
$media
"
>>
"
${
ROOT
}
"
etc/lbu/lbu.conf
fi
else
mkdir
-p
"
${
ROOT
}
"
etc/lbu
echo
"LBU_MEDIA=
$media
"
>>
"
${
ROOT
}
"
etc/lbu/lbu.conf
fi
if
[
-n
"
$ROOT
"
]
&&
[
"
$ROOT
"
!=
"/"
]
;
then
return
fi
# append to fstab if its missing
...
...
@@ -74,7 +83,7 @@ set_media() {
get_mnt_line
"
$mnt
"
/proc/mounts
>>
/etc/fstab
fi
# hack in case we have alpine_dev mou
tn
ed on /media/usbdisk but
# hack in case we have alpine_dev mou
nt
ed on /media/usbdisk but
# lbu is stored on /media/usb
# Otherwise we get issues when we do lbu commit.
if
[
"
$media
"
=
"usb"
]
&&
is_mounted /media/usbdisk
;
then
...
...
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