source: lmd/trunk/fuentes/lmd-lliurex-data.install/usr/share/ltsp/plugins/ltsp-build-client/ISO/000-unsquash-iso @ 6576

Last change on this file since 6576 was 6576, checked in by kbut, 3 years ago

add ltsp plugins to support create client from iso

File size: 1.3 KB
Line 
1#ROOT
2case "$MODE" in
3        commandline)
4            add_option "isopath" "`eval_gettext "Set path for iso to uncompress"`" "advanced" "true"
5        ;;
6        configure)
7            ISOPATH="$(echo $option_isopath_value)"
8        ;;
9        before-install)
10        ;;
11        install)
12            mkdir -p "/var/run/ltsp"
13            ISOTEMPPATH="$(mktemp -d -p /var/run/ltsp/)"
14            if [ -e "$ISOPATH" ]; then
15                    mount -o loop $ISOPATH $ISOTEMPPATH
16                    unsquashfs -d $ROOT -f "$ISOTEMPPATH/casper/filesystem.squashfs"
17                    umount $ISOTEMPPATH
18                    chroot $ROOT apt-get $APT_GET_OPTS update && echo si || { mv $ROOT/etc/apt/sources.list $ROOT/etc/apt/sources.list.old;}
19                    echo "deb http://lliurex.net/xenial xenial main restricted universe multiverse" >> $ROOT/etc/apt/sources.list.d/lliurex.temp.list
20                    echo "deb http://lliurex.net/xenial xenial-updates main restricted universe multiverse" >> $ROOT/etc/apt/sources.list.d/lliurex.temp.list
21                    echo "deb http://lliurex.net/xenial xenial-security main restricted universe multiverse" >> $ROOT/etc/apt/sources.list.d/lliurex.temp.list
22                    chroot $ROOT apt-get $APT_GET_OPTS update
23            else
24                echo "Error: $ISOPATH not exists"
25            fi
26            [ -d $ISOTEMPPATH ] && rm -r $ISOTEMPPATH
27        ;;
28        after-install)
29        ;;
30        finalization)
31#               rm $ROOT/etc/apt/sources.list.d/lliurex.temp.list
32        ;;
33esac
Note: See TracBrowser for help on using the repository browser.