Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
debian-packages
lustre-release
Commits
99c0ea0e
Commit
99c0ea0e
authored
19 years ago
by
Liang Zhen
Browse files
Options
Downloads
Patches
Plain Diff
Small fix for install/uninstall scripts.
parent
deebfec5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build/osxpack/postflight
+2
-0
2 additions, 0 deletions
build/osxpack/postflight
build/osxpack/preflight
+11
-11
11 additions, 11 deletions
build/osxpack/preflight
build/osxpack/uninstall_lustre
+28
-23
28 additions, 23 deletions
build/osxpack/uninstall_lustre
with
41 additions
and
34 deletions
build/osxpack/postflight
+
2
−
0
View file @
99c0ea0e
...
...
@@ -9,3 +9,5 @@ fi
if
[
-d
/System/Library/Caches/com.apple.kernelcaches
]
;
then
rm
-rf
/System/Library/Caches/com.apple.kernelcaches
fi
touch
/System/Library
This diff is collapsed.
Click to expand it.
build/osxpack/preflight
+
11
−
11
View file @
99c0ea0e
...
...
@@ -7,17 +7,13 @@ if ! [ -d $backpath ]; then
mkdir
-p
$backpath
fi
# find and create backup dir for the installation
idx
=
1
while
[
-d
${
backpath
}
/SystemBackup
$idx
]
;
do
echo
"skip
$idx
"
idx
=
`
expr
$idx
+ 1
`
done
backdir
=
${
backpath
}
/SystemBackup
backdir
=
${
backpath
}
/SystemBackup
$idx
if
[
-
f
$backdir
]
;
then
rm
-f
$backdir
>
/dev/null
# If system has been backed up, just exit
if
[
-
d
$
{
backdir
}
]
;
then
exit
0
fi
mkdir
$backdir
chmod
700
$backdir
...
...
@@ -26,6 +22,7 @@ mkdir -p $backdir/System/Library/Frameworks
mkdir
-p
$backdir
/System/Library/Extensions
mkdir
-p
$backdir
/usr/lib
mkdir
-p
$backdir
/usr/include
mkdir
-p
$backdir
/private/etc
# backup the old system
cp
/mach_kernel
$backdir
/
...
...
@@ -61,7 +58,10 @@ cp -f /usr/lib/libIOKit.A.dylib $backdir/usr/lib/libIOKit.A.dylib
cp
-f
/usr/lib/libIOKit.dylib
$backdir
/usr/lib/libIOKit.dylib
cp
-f
/usr/lib/libkmod.a
$backdir
/usr/lib/libkmod.a
cp
-f
/usr/lib/libkmodc++.a
$backdir
/usr/lib/libkmodc++.a
if
[
-f
/private/etc/sysctl.conf
]
;
then
cp
-f
/private/etc/sysctl.conf
$backdir
/private/etc/sysctl.conf
fi
# record sysctem backup path of current installation
echo
$backdir
>>
$backpath
/lustre-current
echo
$date
>
$backdir
/install_date
#
echo $backdir >> $backpath/lustre-current
#
echo $date > $backdir/install_date
This diff is collapsed.
Click to expand it.
build/osxpack/uninstall_lustre
+
28
−
23
View file @
99c0ea0e
...
...
@@ -11,24 +11,24 @@ fi
echo
"unloading modules......"
/sbin/unload_lustre 2
>
/dev/null
back
path
=
/System/LustreBackup
if
!
[
-d
$back
path
]
;
then
back
dir
=
/System/LustreBackup
/SystemBackup
if
!
[
-d
$back
dir
]
;
then
echo
"No backup directory is found, you have not installed lustre or uninstall failed!"
exit
1
fi
if
!
[
-f
$backpath
/lustre-current
]
;
then
echo
"No version information of Lustre installation, you have uninstalled or uninstall failed!"
exit
2
fi
#
if ! [ -f $backpath/lustre-current ]; then
#
echo "No version information of Lustre installation, you have uninstalled or uninstall failed!"
#
exit 2
#
fi
#
# get information of the the backup system
backdir
=
`
tail
-1
$backpath
/lustre-current
`
if
!
[
-d
$backdir
]
;
then
echo
"Miss backup directory, uninstall failed!"
exit
3
fi
#
#
backdir=`tail -1 $backpath/lustre-current`
#
if ! [ -d $backdir ]; then
#
echo "Miss backup directory, uninstall failed!"
#
exit 3
#
fi
# recover the old system
echo
"recover orignal kernel......"
...
...
@@ -69,18 +69,23 @@ cp -f $backdir/usr/lib/libIOKit.A.dylib /usr/lib/libIOKit.A.dylib
cp
-f
$backdir
/usr/lib/libIOKit.dylib /usr/lib/libIOKit.dylib
cp
-f
$backdir
/usr/lib/libkmod.a /usr/lib/libkmod.a
cp
-f
$backdir
/usr/lib/libkmodc++.a /usr/lib/libkmodc++.a
#
cp
$backpath
/lustre-current /tmp/lustre-v
count
=
`
grep
"SystemBackup"
/tmp/lustre-v|wc
-l
`
count
=
`
expr
$count
- 1
`
if
[
$count
-gt
0
]
;
then
head
-
$count
/tmp/lustre-v
>
$backpath
/lustre-current
if
[
-f
$backdir
/private/etc/sysctl.conf
]
;
then
cp
-f
$backdir
/private/etc/sysctl.conf /private/etc/sysctl.conf
else
# The file should be empty now, it's the last uninstall
rm
-f
$backpath
/lustre-current
rm
-f
/private/etc/sysctl.conf
fi
rm
-f
/tmp/lustre-v
#
# cp $backpath/lustre-current /tmp/lustre-v
# count=`grep "SystemBackup" /tmp/lustre-v|wc -l`
# count=`expr $count - 1`
# if [ $count -gt 0 ]; then
# head -$count /tmp/lustre-v > $backpath/lustre-current
# else
# # The file should be empty now, it's the last uninstall
# rm -f $backpath/lustre-current
# fi
# rm -f /tmp/lustre-v
# remove unused files
echo
"uninstall lustre modules and utilities......"
...
...
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