source: lmd/trunk/fuentes/lmd-server.install/usr/sbin/lmd-from-iso-clean @ 6625

Last change on this file since 6625 was 6625, checked in by kbut, 20 months ago

add script to umount iso and delete iso file when cancel build

File size: 344 bytes
Line 
1#!/bin/bash
2
3while [[ $# -gt 0 ]]
4do
5    key="$1"
6
7    case $key in
8        --isopath)
9        ISOPATH="$2"
10        shift
11        shift
12        ;;
13        *)
14        shift
15        ;;
16    esac
17done
18
19if [ "$ISOPATH" != "" ]; then
20    mount | grep -q "$ISOPATH" && umount "$ISOPATH"
21    [[ "$ISOPATH" =~ ^/opt/ltsp/isos/* ]] && && rm "$ISOPATH"
22fi
Note: See TracBrowser for help on using the repository browser.