]> TLD Linux GIT Repositories - packages/rc-scripts.git/commitdiff
- merged UUID support for cryptsetup script and misc bonding script fix
authorMarcin Krol <hawk@tld-linux.org>
Mon, 20 Aug 2018 13:47:38 +0000 (13:47 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 20 Aug 2018 13:47:38 +0000 (13:47 +0000)
misc_fixes.patch
rc-scripts.spec

index 2f76edf568b38b6bb9f9394c8927a5f5868cd9c4..21c5c1af8fa46abe30b5c43e7351848dc0dae57e 100644 (file)
@@ -1,7 +1,36 @@
-diff -ur rc-scripts-0.5.1.orig/rc.d/init.d/network rc-scripts-0.5.1/rc.d/init.d/network
---- rc-scripts-0.5.1.orig/rc.d/init.d/network  2018-07-11 21:54:22.000000000 +0000
-+++ rc-scripts-0.5.1/rc.d/init.d/network       2018-07-22 23:26:49.256418466 +0000
-@@ -168,7 +168,7 @@
+diff --git a/lib/ifdown-bond b/lib/ifdown-bond
+index 1d81ecb..80a2cf2 100755
+--- a/lib/ifdown-bond
++++ b/lib/ifdown-bond
+@@ -38,7 +38,7 @@ setup_ip_param
+ LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
+ # release slave devices
+-for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves); do
++for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves 2>/dev/null); do
+       echo "-${SLAVE_DEV}" > /sys/class/net/${DEVICE}/bonding/slaves
+ done
+diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup
+index 0e7f272..e2ff60e 100755
+--- a/rc.d/init.d/cryptsetup
++++ b/rc.d/init.d/cryptsetup
+@@ -95,6 +95,10 @@ init_crypto() {
+                       continue
+               fi
++              if echo "$src" | grep -q -E "^UUID=" ; then
++                      src="/dev/disk/by-uuid/${src##UUID=}"
++              fi
++
+               if [ ! -b "$src"  ]; then
+                       nls "$src: No such device"
+                       ret=1
+diff --git a/rc.d/init.d/network b/rc.d/init.d/network
+index 5e8cd20..b44e291 100755
+--- a/rc.d/init.d/network
++++ b/rc.d/init.d/network
+@@ -168,7 +168,7 @@ find_boot_interfaces() {
                                DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                                [ "${DEVICE:+set}" != "set" ] && continue
                                [ ${USERS:-no} != no ] && continue
@@ -10,10 +39,11 @@ diff -ur rc-scripts-0.5.1.orig/rc.d/init.d/network rc-scripts-0.5.1/rc.d/init.d/
                        done
                `
  
-diff -ur rc-scripts-0.5.1.orig/sysconfig/system rc-scripts-0.5.1/sysconfig/system
---- rc-scripts-0.5.1.orig/sysconfig/system     2018-07-11 21:54:22.000000000 +0000
-+++ rc-scripts-0.5.1/sysconfig/system  2018-07-22 23:26:23.805419983 +0000
-@@ -13,7 +13,6 @@
+diff --git a/sysconfig/system b/sysconfig/system
+index a196f21..a4f125d 100644
+--- a/sysconfig/system
++++ b/sysconfig/system
+@@ -13,7 +13,6 @@ FASTRC=no
  CONSOLE_LOGLEVEL=1
  
  # On errors (when system is starting) run sulogin instead of shell ?
index cdf9140447e861f2836b1914d72550959b50209e..932e60f58467ac00ef19e3c185b325458981d3b8 100644 (file)
@@ -8,7 +8,7 @@ Summary(pl.UTF-8):      inittab i skrypty startowe z katalogu /etc/rc.d
 Summary(tr.UTF-8):     inittab ve /etc/rc.d dosyaları
 Name:          rc-scripts
 Version:       0.5.1
-Release:       2
+Release:       3
 License:       GPL v2
 Group:         Base
 Source0:       %{name}-%{version}.tar.gz