From 1fc5804085db72d20cb13a0e0dc9178716aa0e42 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Mon, 2 Mar 2020 11:57:36 +0100 Subject: [PATCH] upgrade to nethserver 7.7 --- .drone.yml | 6 +++--- packages.list | 1 + root/isolinux/isolinux.cfg | 12 ++++++------ root/ks/interactive | 26 +++----------------------- root/ks/manual | 30 ++++++++---------------------- root/ks/unattended | 24 ++---------------------- root/ks/unattended-it | 26 +++----------------------- root/libreschool/comps.xml | 1 + 8 files changed, 27 insertions(+), 99 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8fbb012..d1af5e8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,8 +5,8 @@ steps: - name: build image: registry.libreschool.org/libreschool-automation/libreschool-iso-builder:latest settings: - source_iso_url: http://repo.libreschool.org/nethserver/iso/nethserver-7.6.1810-x86_64.iso - output_iso: libreschool-7.6-x86_64.iso + source_iso_url: http://repo.libreschool.org/nethserver/iso/nethserver-7.7.1908-x86_64.iso + output_iso: libreschool-7.7-x86_64.iso when: event: [ push, tag ] @@ -31,7 +31,7 @@ steps: - name: repo_upload image: appleboy/drone-scp settings: - source: libreschool-7.6-x86_64.iso + source: libreschool-7.7-x86_64.iso target: /vhosts/repo.libreschool.org/https/iso host: repo.libreschool.org username: diff --git a/packages.list b/packages.list index 32196b3..f9d1056 100644 --- a/packages.list +++ b/packages.list @@ -13,6 +13,7 @@ krb5-libs krb5-workstation libcom_err libreschool-client-manager +libreschool-nfs libreschool-release libss nethserver-antivirus diff --git a/root/isolinux/isolinux.cfg b/root/isolinux/isolinux.cfg index 80f79a7..6d8e3b9 100644 --- a/root/isolinux/isolinux.cfg +++ b/root/isolinux/isolinux.cfg @@ -6,7 +6,7 @@ timeout 600 display boot.msg menu background splash.jpg -menu title LibreSchool 7.6 +menu title LibreSchool 7 menu vshift 0 menu rows 6 menu helpmsgrow 12 @@ -34,7 +34,7 @@ Choose common installation options like keyboard, time zone, RAID and network. endtext kernel vmlinuz - append initrd=initrd.img inst.stage2=hd:LABEL=nethserver inst.ks=hd:LABEL=nethserver:/ks/interactive inst.nodmraid + append initrd=initrd.img inst.stage2=hd:LABEL=nethserver inst.ks=hd:LABEL=nethserver:/ks/interactive inst.nodmraid net.ifnames=0 biosdevname=0 menu begin menu title Other LibreSchool installation methods @@ -51,7 +51,7 @@ Fully automated installation with default values: * DHCP network configuration endtext kernel vmlinuz - append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/unattended inst.nodmraid + append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/unattended inst.nodmraid net.ifnames=0 biosdevname=0 label unattended-it menu label Unattended installation (Italian) @@ -65,7 +65,7 @@ Fully automated installation with default values: * DHCP network configuration endtext kernel vmlinuz - append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/unattended-it inst.nodmraid + append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/unattended-it inst.nodmraid net.ifnames=0 biosdevname=0 label manual menu label Manual installation @@ -73,7 +73,7 @@ Fully automated installation with default values: Customize storage and network parameters. endtext kernel vmlinuz - append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/manual inst.nodmraid + append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/manual inst.nodmraid net.ifnames=0 biosdevname=0 menu end @@ -119,7 +119,7 @@ Check hardware with the Hardware Detection Tool kernel hdt.c32 menu end -menu separtor +menu separator label local menu label Boot from local drive diff --git a/root/ks/interactive b/root/ks/interactive index 8292816..1472bea 100755 --- a/root/ks/interactive +++ b/root/ks/interactive @@ -60,7 +60,7 @@ fi # enable dhcp on all network interfaces for net in `find /sys/class/net/ -mindepth 1 ! -name lo | cut -d '/' -f5`; do - echo "network --activate --onboot=yes --bootproto=dhcp --device=$net" --nameserver=8.8.8.8 >>/tmp/network-include + echo "network --activate --onboot=yes --bootproto=dhcp --device=$net" >>/tmp/network-include done echo "network --nameserver=8.8.8.8 --hostname=pdc.libre.school" >> /tmp/network-include @@ -81,6 +81,7 @@ fi @nethserver-iso @core @libreschool-iso +-biosdevname %end repo --name=nethserver --baseurl=file:///run/install/repo/extras @@ -142,29 +143,8 @@ if [ -f /etc/nethserver-release ]; then echo -e 'Kernel \\r on an \\m\n' >> /etc/issue echo 'Access the web interface at the following URLs:' >> /etc/issue ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:980 >> /etc/issue + ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:9090 >> /etc/issue echo >> /etc/issue fi -echo "Renaming network interfaces" -TMPFILE=/tmp/9C358C31-BC02-4B63-BAAB-4D82DA0E297C -OUTFILE=/etc/udev/rules.d/70-persistent-net.rules -ip link show | grep 'link/ether' | sed 's/.*ether\ \([0-9a-fA-F:]*\)\ brd.*/\1/' > $TMPFILE -LINES=$(wc -l $TMPFILE) -# TODO: should be at least 2 lines -N=0 -while read MAC ; do - if (( N > 1 )) ; then - NUM=$(( N-1 )) - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan${NUM}\"" >> $OUTFILE - fi - if (( N == 1 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"wan0\"" >> $OUTFILE - fi - if (( N == 0 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan0\"" >> $OUTFILE - fi - N=$(( N + 1 )) -done < $TMPFILE -rm $TMPFILE - %end diff --git a/root/ks/manual b/root/ks/manual index 1d30b3c..ffe65ed 100755 --- a/root/ks/manual +++ b/root/ks/manual @@ -1,7 +1,13 @@ #platform=x86, AMD64, or Intel EM64T #version=RHEL7 +%pre +# enable dhcp on all network interfaces +for net in `find /sys/class/net/ -mindepth 1 ! -name lo | cut -d '/' -f5`; do + echo "network --activate --onboot=yes --bootproto=dhcp --device=$net" >>/tmp/network-include +done echo "network --nameserver=8.8.8.8 --hostname=pdc.libre.school" >> /tmp/network-include + # # Selected packages # @@ -9,6 +15,7 @@ echo "network --nameserver=8.8.8.8 --hostname=pdc.libre.school" >> /tmp/network- @nethserver-iso @core @libreschool-iso +-biosdevname %end repo --name=nethserver --baseurl=file:///run/install/repo/extras @@ -52,29 +59,8 @@ if [ -f /etc/nethserver-release ]; then echo -e 'Kernel \\r on an \\m\n' >> /etc/issue echo 'Access the web interface at the following URLs:' >> /etc/issue ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:980 >> /etc/issue + ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:9090 >> /etc/issue echo >> /etc/issue fi -echo "Renaming network interfaces" -TMPFILE=/tmp/9C358C31-BC02-4B63-BAAB-4D82DA0E297C -OUTFILE=/etc/udev/rules.d/70-persistent-net.rules -ip link show | grep 'link/ether' | sed 's/.*ether\ \([0-9a-fA-F:]*\)\ brd.*/\1/' > $TMPFILE -LINES=$(wc -l $TMPFILE) -# TODO: should be at least 2 lines -N=0 -while read MAC ; do - if (( N > 1 )) ; then - NUM=$(( N-1 )) - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan${NUM}\"" >> $OUTFILE - fi - if (( N == 1 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"wan0\"" >> $OUTFILE - fi - if (( N == 0 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan0\"" >> $OUTFILE - fi - N=$(( N + 1 )) -done < $TMPFILE -rm $TMPFILE - %end diff --git a/root/ks/unattended b/root/ks/unattended index 4ce53c9..95627c7 100755 --- a/root/ks/unattended +++ b/root/ks/unattended @@ -93,6 +93,7 @@ fi @nethserver-iso @core @libreschool-iso +-biosdevname %end repo --name=nethserver --baseurl=file:///run/install/repo/extras @@ -157,29 +158,8 @@ if [ -f /etc/nethserver-release ]; then echo -e 'Kernel \\r on an \\m\n' >> /etc/issue echo 'Access the web interface at the following URLs:' >> /etc/issue ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:980 >> /etc/issue + ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:9090 >> /etc/issue echo >> /etc/issue fi -echo "Renaming network interfaces" -TMPFILE=/tmp/9C358C31-BC02-4B63-BAAB-4D82DA0E297C -OUTFILE=/etc/udev/rules.d/70-persistent-net.rules -ip link show | grep 'link/ether' | sed 's/.*ether\ \([0-9a-fA-F:]*\)\ brd.*/\1/' > $TMPFILE -LINES=$(wc -l $TMPFILE) -# TODO: should be at least 2 lines -N=0 -while read MAC ; do - if (( N > 1 )) ; then - NUM=$(( N-1 )) - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan${NUM}\"" >> $OUTFILE - fi - if (( N == 1 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"wan0\"" >> $OUTFILE - fi - if (( N == 0 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan0\"" >> $OUTFILE - fi - N=$(( N + 1 )) -done < $TMPFILE -rm $TMPFILE - %end diff --git a/root/ks/unattended-it b/root/ks/unattended-it index ecb4a93..ed1b1df 100644 --- a/root/ks/unattended-it +++ b/root/ks/unattended-it @@ -94,6 +94,7 @@ fi @core @libreschool-iso nethserver-lang-it +-biosdevname %end repo --name=nethserver --baseurl=file:///run/install/repo/extras @@ -109,7 +110,7 @@ rootpw --plaintext LibreSchool,1234 # System keyboard %include /tmp/keyboard-include # System language -lang en_US +lang it_IT # SELinux configuration selinux --permissive # Do not configure the X Window System @@ -158,29 +159,8 @@ if [ -f /etc/nethserver-release ]; then echo -e 'Kernel \\r on an \\m\n' >> /etc/issue echo 'Access the web interface at the following URLs:' >> /etc/issue ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:980 >> /etc/issue + ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:9090 >> /etc/issue echo >> /etc/issue fi -echo "Renaming network interfaces" -TMPFILE=/tmp/9C358C31-BC02-4B63-BAAB-4D82DA0E297C -OUTFILE=/etc/udev/rules.d/70-persistent-net.rules -ip link show | grep 'link/ether' | sed 's/.*ether\ \([0-9a-fA-F:]*\)\ brd.*/\1/' > $TMPFILE -LINES=$(wc -l $TMPFILE) -# TODO: should be at least 2 lines -N=0 -while read MAC ; do - if (( N > 1 )) ; then - NUM=$(( N-1 )) - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan${NUM}\"" >> $OUTFILE - fi - if (( N == 1 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"wan0\"" >> $OUTFILE - fi - if (( N == 0 )) ; then - echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${MAC}\", NAME=\"lan0\"" >> $OUTFILE - fi - N=$(( N + 1 )) -done < $TMPFILE -rm $TMPFILE - %end \ No newline at end of file diff --git a/root/libreschool/comps.xml b/root/libreschool/comps.xml index 9da8a2d..91de755 100644 --- a/root/libreschool/comps.xml +++ b/root/libreschool/comps.xml @@ -24,6 +24,7 @@ nethserver-squidguard libreschool-release libreschool-client-manager + libreschool-nfs nethserver-usercsvimport