File tree 4 files changed +20
-6
lines changed
4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ RORDIR=/opt/es/
17
17
18
18
# Ubuntu OS
19
19
DISTRO=$( lsb_release -sd | cut -d ' ' -f 2)
20
- UNIV=$( apt-cache policy | grep http | awk ' {print $3}' | grep universe | head -n 1 | cut -d " /" -f 2)
21
20
# Network
22
21
[ ! -z " $FIRST_IFACE " ] && IFACE=$( lshw -c network | grep " logical name" | awk ' {print $3; exit}' )
23
22
IFACE2=$( ip -o link show | awk ' {print $2,$9}' | grep ' UP' | cut -d ' :' -f 1)
747
746
748
747
# Check universe reposiroty
749
748
check_universe () {
750
- if [ " $UNIV " = " universe" ]
749
+ UNIV=$( apt-cache policy | grep http | awk ' {print $3}' | grep universe | head -n 1 | cut -d " /" -f 2)
750
+ if [ " $UNIV " != " universe" ]
751
751
then
752
- echo " Seems that required repositories are ok."
753
- else
754
- echo " Adding required repo (universe)."
755
- add-apt-repository universe
752
+ echo " Adding required repo (universe)."
753
+ add-apt-repository universe
754
+ fi
755
+ }
756
+
757
+ # Check universe reposiroty
758
+ check_multiverse () {
759
+ MULTIV=$( apt-cache policy | grep http | awk ' {print $3}' | grep multiverse | head -n 1 | cut -d " /" -f 2)
760
+ if [ " $MULTIV " != " multiverse" ]
761
+ then
762
+ echo " Adding required repo (multiverse)."
763
+ add-apt-repository multiverse
756
764
fi
757
765
}
758
766
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ rm $SCRIPTS/adduser.sh
73
73
# Check distrobution and version
74
74
check_distro_version
75
75
check_universe
76
+ check_multiverse
76
77
77
78
# Check if key is available
78
79
if ! wget -q -T 10 -t 2 " $NCREPO " > /dev/null
Original file line number Diff line number Diff line change @@ -271,6 +271,7 @@ if dpkg -l | grep libzfs2linux
271
271
then
272
272
if grep -r ncdata /etc/mtab
273
273
then
274
+ check_multiverse
274
275
install_if_not zfs-auto-snapshot
275
276
sed -i " s|date --utc|date|g" /usr/sbin/zfs-auto-snapshot
276
277
check_command zfs-auto-snapshot -r ncdata
Original file line number Diff line number Diff line change 10
10
# Check if root
11
11
root_check
12
12
13
+ # Needs to be Ubuntu 18.04 and Multiverse
14
+ check_distro_version
15
+ check_multiverse
16
+
13
17
LABEL_=ncdata
14
18
MOUNT_=/mnt/$LABEL_
15
19
You can’t perform that action at this time.
0 commit comments