summaryrefslogtreecommitdiff
path: root/Install-foo
diff options
context:
space:
mode:
Diffstat (limited to 'Install-foo')
-rw-r--r--Install-foo94
1 files changed, 0 insertions, 94 deletions
diff --git a/Install-foo b/Install-foo
deleted file mode 100644
index 99efd7e..0000000
--- a/Install-foo
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/ksh -x
-#
-# This file and its contents are supplied under the terms of the
-# Common Development and Distribution License ("CDDL"), version 1.0.
-# You may only use this file in accordance with the terms of version
-# 1.0 of the CDDL.
-#
-# A full copy of the text of the CDDL should have accompanied this
-# source. A copy of the CDDL is also available via the Internet at
-# http://www.illumos.org/license/CDDL.
-#
-
-#
-# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
-#
-
-cpu=`uname -p`
-
-# Where is destination?
-if [ "$1" ] ; then
- DEST=$1
-fi
-
-# Where is PROTO? (arg? env? proto?)
-if [ "$2" ] ; then
- PROTO=$2
-elif [ "$ROOT" ] ; then
- PROTO=$ROOT
-elif [ -d ./proto ] ; then
- PROTO=`pwd`/proto/root_$cpu
-else
- echo "PROTO env?"
- exit 1
-fi
-
-case $cpu in
-i386)
- ARCH64=amd64
- ;;
-sparc)
- ARCH64=sparcv9
- ;;
-*) echo "Huh?" ; exit 1;;
-esac
-
-# Stop on error, and make noise
-set -ex
-
-# Stop the service
-# svcadm disable svc:/...
-
-# Unload old FOO
-modinfo |grep ' foo ' |while read i junk
-do
- modunload -i $i
-done
-
-# Copy in the new binaries
-while read f
-do
- cmp -s $PROTO/$f $DEST/$f || {
- echo "update $DEST/$f"
- if [ -f $PROTO/$f ] ; then
- if [ -f $DEST/$f.orig ] ; then
- rm -f $DEST/$f || :
- else
- mv $DEST/$f $DEST/$f.orig || :
- fi
- fi
- cp $PROTO/$f $DEST/$f
- }
-done <<EOF
-kernel/drv/foo.conf
-kernel/drv/foo
-kernel/drv/amd64/foo
-usr/lib/libfoo.so.1
-usr/bin/foo
-EOF
-
-if [ -z "$DEST" ]
-then
-
- modload -p drv/foo
- add_drv -m '* 0666 root sys" foo
- devfsadm -i foo
-
- # Reimport the manifest
- # svccfg import /lib/svc/manifest/...
- # svcadm restart manifest-import
-
- # Refresh, Restart the service
- # svcadm enable svc:/...
-
-fi