Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
le4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Linux Educacional 4
le4
Commits
bf845f5c
Commit
bf845f5c
authored
11 years ago
by
Lior Spach
Browse files
Options
Downloads
Patches
Plain Diff
le-pregao-712010: Refs #1280, Better performance of building and installing
Signed-off-by:
Lior Spach
<
ls12@inf.ufpr.br
>
parent
e3f5b4cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
le-pregao-712010/pacote/DEBIAN/postinst
+13
-3
13 additions, 3 deletions
le-pregao-712010/pacote/DEBIAN/postinst
le-pregao-712010/pacote/DEBIAN/postrm
+11
-2
11 additions, 2 deletions
le-pregao-712010/pacote/DEBIAN/postrm
with
24 additions
and
5 deletions
le-pregao-712010/pacote/DEBIAN/postinst
+
13
−
3
View file @
bf845f5c
...
@@ -23,11 +23,16 @@
...
@@ -23,11 +23,16 @@
PACKAGE_NAME
=
"lepregao712010"
PACKAGE_NAME
=
"lepregao712010"
PACKAGE_VERSION
=
"2.3.0.0-Alpha-v2"
PACKAGE_VERSION
=
"2.3.0.0-Alpha-v2"
KERNEL_VERSION
=
"
$(
uname
-r
)
"
KERNEL_VERSION
=
"
$(
uname
-r
)
"
ALL_KERNEL_VERSION
=
"
$(
dpkg
--get-selections
| egrep
'^linux-image.*generic-pae.*install$'
|
awk
'{print $1}'
|
cut
--bytes
=
13-
)
"
# Put conflicting modules at /etc/modprobe.d/blacklist.conf
# Put conflicting modules at /etc/modprobe.d/blacklist.conf
echo
"# replaced by rt3562sta"
>>
/etc/modprobe.d/blacklist.conf
echo
"# replaced by rt3562sta"
>>
/etc/modprobe.d/blacklist.conf
echo
"blacklist rt2800pci"
>>
/etc/modprobe.d/blacklist.conf
echo
"blacklist rt2800pci"
>>
/etc/modprobe.d/blacklist.conf
# Put conflicting modules at /etc/modprobe.d/blacklist.conf
echo
"# enable wireless for pregao 71/2010"
>>
/etc/modules
echo
"rt3562sta"
>>
/etc/modules
# Function to set selections
# Function to set selections
setselections
()
{
setselections
()
{
selfile
=
$1
selfile
=
$1
...
@@ -41,14 +46,19 @@ setselections() {
...
@@ -41,14 +46,19 @@ setselections() {
# Hold Kernel
# Hold Kernel
sels
=
$(
mktemp
)
sels
=
$(
mktemp
)
auxfile
=
$(
mktemp
)
auxfile
=
$(
mktemp
)
dpkg
--get-selections
\*
>
${
sels
}
dpkg
--get-selections
>
${
sels
}
awk
'{if (($1 ~ /^linux-image-generic-pae/) || ($1 ~ /^linux-headers-generic-pae/)) {print $1"\thold"} else { print $0} }'
${
sels
}
>
\
awk
'{if (($1 ~ /^linux-image-generic-pae/) || ($1 ~ /^linux-headers-generic-pae/)) {print $1"\thold"} else { print $0} }'
${
sels
}
>
\
${
auxfile
}
${
auxfile
}
rm
-f
${
sels
}
rm
-f
${
sels
}
setselections
${
auxfile
}
&
disown
setselections
${
auxfile
}
&
disown
echo
"Building module for all installed kernels using dkms..."
echo
"Building and Installing module for each installed kernel using dkms..."
/usr/lib/dkms/common.postinst
$PACKAGE_NAME
$PACKAGE_VERSION
dkms add
-m
$PACKAGE_NAME
-v
$PACKAGE_VERSION
for
EACH_KERNEL
in
$ALL_KERNEL_VERSION
do
dkms build
-m
$PACKAGE_NAME
-v
$PACKAGE_VERSION
-k
$EACH_KERNEL
dkms
install
-m
$PACKAGE_NAME
-v
$PACKAGE_VERSION
-k
$EACH_KERNEL
done
echo
"Loading module rt3562sta"
echo
"Loading module rt3562sta"
modprobe rt3562sta
||
true
modprobe rt3562sta
||
true
...
...
This diff is collapsed.
Click to expand it.
le-pregao-712010/pacote/DEBIAN/postrm
+
11
−
2
View file @
bf845f5c
...
@@ -20,12 +20,21 @@
...
@@ -20,12 +20,21 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# USA.
if
[[
"
$1
"
=
"upgrade"
]]
;
then
exit
0
fi
# TODO: remove lines instead of changing them to "blank"
# removing conflicting modules from blacklist
# removing conflicting modules from blacklist
sed
-i
s/
'# replaced by rt3562sta'
/
''
/ /etc/modprobe.d/blacklist.conf
sed
-i
s/
'# replaced by rt3562sta'
/
''
/ /etc/modprobe.d/blacklist.conf
sed
-i
s/
'blacklist rt2800pci'
/
''
/ /etc/modprobe.d/blacklist.conf
sed
-i
s/
'blacklist rt2800pci'
/
''
/ /etc/modprobe.d/blacklist.conf
echo
"Running depmod..."
# removing wireless entries from modules file
/sbin/depmod
-a
2.6.32-29-generic-pae
sed
-i
s/
'# enable wireless for pregao 71/2010'
/
''
/ /etc/modules
sed
-i
s/
'rt3562sta'
/
''
/ /etc/modules
echo
"Removing wireless module from dkms tree..."
dkms remove
-m
lepregao712010
-v
2.3.0.0-Alpha-v2
--all
echo
"Restarting network interfaces"
echo
"Restarting network interfaces"
/etc/init.d/networking restart
||
true
/etc/init.d/networking restart
||
true
...
...
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