source: llx-netinstall/trunk/fuentes/install.llx-netinstall/usr/share/llx-netinstall/templates/d-i-late-command @ 2661

Last change on this file since 2661 was 2661, checked in by mabarracus, 3 years ago

Changed script path

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2#
3# This script is licensed under GPL V3 or higher
4#
5#
6
7
8# First fix the sources list for generic lliurex flavours
9put_apt_conf(){
10    base="${1}"
11    param="${2}"
12
13    if [ -z "${param}" ]; then
14        param="desktop"
15    fi 
16    case $param in
17        "client")
18            SERVER="http://mirror/llx1605"
19        ;;
20        "server")
21            SERVER="file:///net/mirror/llx1605"
22        ;;
23        "desktop")
24            SERVER="http://lliurex.net/xenial"
25        ;;
26        *)
27            SERVER="http://lliurex.net/xenial"
28        ;;
29    esac
30   
31    echo "# LliureX Net-Installation ${param}"  >> ${BASE_DIR}/etc/apt/sources.list
32    echo "deb ${SERVER} xenial main universe restricted multiverse"  > ${BASE_DIR}/etc/apt/sources.list
33    echo "deb ${SERVER} xenial-updates main universe restricted multiverse"  > ${BASE_DIR}/etc/apt/sources.list
34    echo "deb ${SERVER} xenial-security main universe restricted multiverse"  > ${BASE_DIR}/etc/apt/sources.list
35}
36
37# Initial param checking
38
39if [ -z "${1}" ]; then 
40    exit 1
41else
42    BASE_DIR="$1"
43fi
44
45if [ ! -d "${BASE_DIR}" -o ! -f "${BASE_DIR}/etc/apt/sources.list" ];then
46    exit 1
47fi
48
49# Initial tool dependence checking
50llx_version_bin="$(which lliurex-version)"
51
52if [ -z "${llx_version_bin}" ]; then
53    exit 1
54fi
55
56# Put right sources.list
57for class in {client,server,desktop}; do
58    lliurex-version -t ${class} && put_apt_conf ${BASE_DIR} ${class}
59done
60
61exit 0
Note: See TracBrowser for help on using the repository browser.