diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2003-01-06 22:12:44 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2003-01-06 22:12:44 +0000 |
commit | 6bf149612278a5af821eb62ac0b4dedbdaa479a0 (patch) | |
tree | 6c8b3ed1f558a257990fb5833c68972e41b105f1 /app-emulation | |
parent | Added mips to keywords (diff) | |
download | gentoo-2-6bf149612278a5af821eb62ac0b4dedbdaa479a0.tar.gz gentoo-2-6bf149612278a5af821eb62ac0b4dedbdaa479a0.tar.bz2 gentoo-2-6bf149612278a5af821eb62ac0b4dedbdaa479a0.zip |
gentoo initscript
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/win4lin/files/win4lin.initd | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/app-emulation/win4lin/files/win4lin.initd b/app-emulation/win4lin/files/win4lin.initd new file mode 100644 index 000000000000..a26554431ed5 --- /dev/null +++ b/app-emulation/win4lin/files/win4lin.initd @@ -0,0 +1,68 @@ +#!/sbin/runscript +. /etc/mrgssv.sh + +depend() { + after * +} + +CLEAN_TMP() { + [ -z "${VARMERGE}" ] && return + find ${VARMERGE}/tmp -atime +1 -type f -exec rm {} \; + return +} + +Work_Around() { + [ "_${SYSTEMTYPE} != "_linux" ] && return + # In certain situations on Linux systems, the Win4Lin installation + # script does not complete. + # If it looks like that situation then re-run the installation script + # and force the making of the images. (Even though the images should + # have been automatically created in this situation.) + + # When the images are not there, but Windows files are loaded, then + # re-run the install script and then explicitly make images. + [ -r "${VARMERGE}"/image/std/mono/mono.img ] && return + [ ! -r "${VARMERGE}"/dosroot/wincabs/info.txt ] && return + + # Don't continue if the modules are not loaded. + modules=`/sbin/lsmod|grep Mmerge` + [ "x$modules" = "x" ] && return + + [ -r "${VARMERGE}"/postinst-running ] && return + touch "${VARMERGE}"/postinst-running + sh "${STATICMERGE}"/postinst_rpm.sh \ + > "${VARMERGE}"/log/postinst-boot.log 2>&1 + + ls -l "${VARMERGE}"/image/std/* > "${VARMERGE}"/log/mkimg-boot.log 2>&1 + /usr/bin/mkimg >> "${VARMERGE}"/log/mkimg-boot.log 2>&1 + rm -f "${VARMERGE}"/postinst-running +} + +start() { + if [ "_${SYSTEMTYPE}" != "_linux" ] + then + ebegin "Starting ${MERGENAME}" + else + ebegin "Starting ${MERGENAME}:" + + CLEAN_TMP + sh ${STATICMERGE}mrg_setup.sh + Work_Around + eend $? +} + + +stop() { + if [ "_${SYSTEMTYPE}" != "_linux" ] + then + ebegin "Stopping ${MERGENAME}" + eend $? + return + fi + + ebegin "Stopping ${MERGENAME}:" + ( cd ${STATICMERGE}/drivers ; sh tools/unloadem ) + ${STATICMERGE}/rlockshm -r > /dev/null 2>&1 + eend $? +} + |