Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit sample postinstall scripts for the cuda9 kernel parameters for diskless images #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions postscripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# xCAT Postscripts Samples

1. To use, clone this repo down to `/install/` on your management node

```
cd /install
# may want to clone this read only
git clone [email protected]:xcat2/xcat-extensions.git
```

11 changes: 11 additions & 0 deletions postscripts/postinstall/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# postinstall scripts

The `compute.postinstall` script will look into the `postinstall.d` directory and execute any postscripts that have 755 permission.

To add this to your `osimage` definition:

```
# Assumes that this repo has been cloned to `/install` on your management node
chdef -t osimage <osimage> -p postinstall=/install/xcat-extensions/postscripts/postinstall/compute.postinstall
```

37 changes: 37 additions & 0 deletions postscripts/postinstall/compute.postinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
#-- this script is run after all packages from $profile.pkglist are installed
#--
#-- it gets these arguments:
#--
#-- $1 = install root (chroot directory for profile)
#-- $2 = OS version
#-- $3 = architecture
#-- $4 = profile name
#-- $5 = work dir (where genimage is located)
#--
#--

#set -e

thisdir=`dirname $0`
thisscript=`basename $0`

source $thisdir/functions $*

unset ARCH
unset XCAT_IN_CHROOT;


return_value=0

# RB: Custom post install gorp.
# return the last error found, or, zero if all cleared.
for s in $(find $thisdir/postinstall.d -type f -executable -maxdepth 1 | sort); do
echo "`date` Running postscript: $s"
rc=0
$s $installroot $osver $arch $profile $workdir || rc=$?;
echo "postscript $s return with $rc";
[[ $rc != 0 ]] && return_value=$rc;
done
exit $return_value;

Loading