[PATCH 1/2] Move the s390 profile scripts to a subfolder

Martin Kolman mkolman at redhat.com
Fri Nov 13 17:21:11 UTC 2015


Move the scripts to a s390 subfolder so that it is evident that
the scripts are used only on the s390.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 scripts/initial-setup.csh      | 12 ------------
 scripts/initial-setup.sh       | 14 --------------
 scripts/s390/initial-setup.csh | 12 ++++++++++++
 scripts/s390/initial-setup.sh  | 14 ++++++++++++++
 setup.py                       |  4 ++--
 5 files changed, 28 insertions(+), 28 deletions(-)
 delete mode 100644 scripts/initial-setup.csh
 delete mode 100644 scripts/initial-setup.sh
 create mode 100644 scripts/s390/initial-setup.csh
 create mode 100644 scripts/s390/initial-setup.sh

diff --git a/scripts/initial-setup.csh b/scripts/initial-setup.csh
deleted file mode 100644
index 673c9d4..0000000
--- a/scripts/initial-setup.csh
+++ /dev/null
@@ -1,12 +0,0 @@
-# initial-setup.csh
-
-set IS_EXEC = /usr/bin/initial-setup
-set IS_UNIT = initial-setup-text.service
-
-# check if the Initial Setup unit is enabled and the executable is available
-if ( { systemctl -q is-enabled $IS_UNIT } && -x $IS_EXEC ) then
-    # check if we're not on 3270 terminal and root
-    if (( `/sbin/consoletype` == "pty" ) && ( `/usr/bin/id -u` == 0 )) then
-        $IS_EXEC && systemctl -q disable $IS_UNIT
-    endif
-endif
diff --git a/scripts/initial-setup.sh b/scripts/initial-setup.sh
deleted file mode 100644
index f7bd0cb..0000000
--- a/scripts/initial-setup.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-# firstboot.sh
-
-IS_EXEC=/usr/bin/initial-setup
-IS_UNIT=initial-setup-text.service
-
-IS_AVAILABLE=0
-# check if the Initial Setup unit is enabled and the executable is available
-systemctl -q is-enabled $IS_UNIT && [ -f $IS_EXEC ] && IS_AVAILABLE=1
-if [ $IS_AVAILABLE -eq 1 ]; then
-    # check if we're not on 3270 terminal and root
-    if [ $(/sbin/consoletype) = "pty" ] && [ $EUID -eq 0 ]; then
-        $IS_EXEC && systemctl -q disable $IS_UNIT
-    fi
-fi
diff --git a/scripts/s390/initial-setup.csh b/scripts/s390/initial-setup.csh
new file mode 100644
index 0000000..673c9d4
--- /dev/null
+++ b/scripts/s390/initial-setup.csh
@@ -0,0 +1,12 @@
+# initial-setup.csh
+
+set IS_EXEC = /usr/bin/initial-setup
+set IS_UNIT = initial-setup-text.service
+
+# check if the Initial Setup unit is enabled and the executable is available
+if ( { systemctl -q is-enabled $IS_UNIT } && -x $IS_EXEC ) then
+    # check if we're not on 3270 terminal and root
+    if (( `/sbin/consoletype` == "pty" ) && ( `/usr/bin/id -u` == 0 )) then
+        $IS_EXEC && systemctl -q disable $IS_UNIT
+    endif
+endif
diff --git a/scripts/s390/initial-setup.sh b/scripts/s390/initial-setup.sh
new file mode 100644
index 0000000..f7bd0cb
--- /dev/null
+++ b/scripts/s390/initial-setup.sh
@@ -0,0 +1,14 @@
+# firstboot.sh
+
+IS_EXEC=/usr/bin/initial-setup
+IS_UNIT=initial-setup-text.service
+
+IS_AVAILABLE=0
+# check if the Initial Setup unit is enabled and the executable is available
+systemctl -q is-enabled $IS_UNIT && [ -f $IS_EXEC ] && IS_AVAILABLE=1
+if [ $IS_AVAILABLE -eq 1 ]; then
+    # check if we're not on 3270 terminal and root
+    if [ $(/sbin/consoletype) = "pty" ] && [ $EUID -eq 0 ]; then
+        $IS_EXEC && systemctl -q disable $IS_UNIT
+    fi
+fi
diff --git a/setup.py b/setup.py
index d40df22..cbe0b97 100644
--- a/setup.py
+++ b/setup.py
@@ -36,8 +36,8 @@ data_files = [('/usr/lib/systemd/system', glob('systemd/*.service'))]
 
 # add the firstboot start script for s390 architectures
 if os.uname()[4].startswith('s390'):
-    data_files.append(('/etc/profile.d', ['scripts/initial-setup.sh']))
-    data_files.append(('/etc/profile.d', ['scripts/initial-setup.csh']))
+    data_files.append(('/etc/profile.d', ['scripts/s390/initial-setup.sh']))
+    data_files.append(('/etc/profile.d', ['scripts/s390/initial-setup.csh']))
 
 setup(
     name = "initial-setup",
-- 
2.5.0



More information about the anaconda-patches mailing list