123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- XCOMM $XConsortium: install.dt.dec.src /main/3 1996/11/19 11:43:45 drk $
- XCOMM ==========================================================================
- XCOMM ==========================================================================
- XCOMM install.dt.dec.src
- XCOMM
- XCOMM Platform specific function overrides for the April 1994 Snapshot
- XCOMM install script, install.dt.
- XCOMM
- XCOMM This file is sourced by the install.dt script to allow platform
- XCOMM specific behavior for certain functionality. These functions are:
- XCOMM
- XCOMM DtiClearScreen() - clear the screen
- XCOMM DtiFreeSpace() - return available bytes in a directory
- XCOMM DtiVerifyConfiguration() - verify system configuration
- XCOMM DtiWhoami() - return user name
- XCOMM
- XCOMM ==========================================================================
- XCOMM ==========================================================================
- XCOMM
- XCOMM DtiClearScreen() - clears the screen
- XCOMM
- XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
- XCOMM screen. If this platform does not have the 'clear' command,
- XCOMM declare DtiClearScreen() here with the appropriate functionality.
- XCOMM
- XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
- XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
- XCOMM use it if possible.
- XCOMM
- XCOMM Example:
- XCOMM
- XCOMM DtiClearScreen()
- XCOMM {
- XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
- XCOMM DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
- XCOMM }
- XCOMM
- XCOMM Input - none
- XCOMM Output - none
- XCOMM Return -none
- XCOMM ==========================================================================
- XCOMM DtiClearScreen() {
- XCOMM clear 1>&2
- XCOMM }
- XCOMM ==========================================================================
- XCOMM
- XCOMM DtiFreeSpace
- XCOMM
- XCOMM The default DtiFreeSpace() does not check for free space, rather it
- XCOMM simply returns a BigNumber that install.dt will assume is large
- XCOMM enough in which to install the desktop.
- XCOMM
- XCOMM Declare DtiFreeSpace() here to return the actual available space for
- XCOMM a particular directory.
- XCOMM
- XCOMM The $1 parameter will contain the directory name to test. The directory
- XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
- XCOMM available via the DtiReturn() function.
- XCOMM
- XCOMM Input
- XCOMM $1 - directory name
- XCOMM Output - none
- XCOMM Return
- XCOMM number of bytes available
- XCOMM
- XCOMM ==========================================================================
- DtiFreeSpace()
- {
- BDFOUT=`df -k $1 | awk '{print $4}'`
- for i in $BDFOUT
- do
- if [ "$i" != "Avail" ]
- then
- i=`expr $i \* 1024`
- DtiReturn "$i"
- fi
- done
- }
- XCOMM ==========================================================================
- XCOMM
- XCOMM DtiVerifyConfiguration
- XCOMM
- XCOMM The default DtiVerifyConfiguration() does no system configuration
- XCOMM testing. For a particular platform, one might want to test for
- XCOMM the presence of X11R5 or the OS version, for example, before allowing
- XCOMM the desktop to be installed.
- XCOMM
- XCOMM Declare this function to make such platform specific tests. Return
- XCOMM "yes" if the system passed, or "<message text>" if the system failed
- XCOMM in which case install.dt will display the <message text> as the reason.
- XCOMM
- XCOMM Input - none
- XCOMM Output - none
- XCOMM Return
- XCOMM "yes" - system configuration verified
- XCOMM "<message text>" - verification failed, display message text
- XCOMM
- XCOMM ==========================================================================
- XCOMM DtiVerifyConfiguration()
- XCOMM {
- XCOMM DtiReturn "yes"
- XCOMM }
- XCOMM ==========================================================================
- XCOMM
- XCOMM DtiWhoami
- XCOMM
- XCOMM The default DtiWhoami() uses the 'whoami' command to determine
- XCOMM the user name. If this platform does not have the 'whoami' command,
- XCOMM declare DtiWhoami() here with the appropriate functionality.
- XCOMM
- XCOMM Input - none
- XCOMM Output - none
- XCOMM Return
- XCOMM result of system 'whoami' command
- XCOMM
- XCOMM ==========================================================================
- DtiWhoami()
- {
- /usr/bin/whoami
- }
|