Updates specfile to match distro guidelines. Suppots modifying client directory path at build time.
- Support relocating client files at build time (required for LSB compliant nodes) - OS varable added to perform some make choices - Saving and exporting the Makefile vars now scripted using list of variables - Updated specfile to match RH and SUSE requirements and guidelines - Moved /usr/local/var to /var/local; dynamic files shall not use /usr. - State files use %sharedstatedir for path (std for SLE and RHEL) - Release value adjusted to meet different DEB and RPM reqs. Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
. @WWCLIENTDIR@/config
|
||||
|
||||
echo "Bringing up lo:127.0.0.1"
|
||||
/sbin/ip link set dev lo up
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /warewulf/config
|
||||
. @WWCLIENTDIR@/config
|
||||
|
||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
. @WWCLIENTDIR@/config
|
||||
|
||||
# This will eventually be optional
|
||||
if true; then
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
. @WWCLIENTDIR@/config
|
||||
# Only start if the systemd is no available
|
||||
test -e /usr/lib/systemd/systemd && exit 0
|
||||
echo "Starting wwclient"
|
||||
nohup /warewulf/bin/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
||||
nohup @WWCLIENTDIR@/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /warewulf/config
|
||||
. @WWCLIENTDIR@/config
|
||||
|
||||
if test -z "$WWROOT"; then
|
||||
echo "Skipping SELinux configuration: Warewulf Root device not set"
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
echo "Hello from WWINIT"
|
||||
|
||||
. /warewulf/config
|
||||
. @WWCLIENTDIR@/config
|
||||
|
||||
for i in /warewulf/init.d/*; do
|
||||
for i in @WWCLIENTDIR@/init.d/*; do
|
||||
NAME=`basename $i`
|
||||
echo "Launching: $NAME"
|
||||
sh "$i"
|
||||
@@ -5,7 +5,7 @@ After=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/warewulf/bin/wwclient
|
||||
ExecStart=@WWCLIENTDIR@/wwclient
|
||||
ExecReload=/bin/kill -s SIGHUP "$MAINPID"
|
||||
PIDFile=/var/run/wwclient.pid
|
||||
TimeoutSec=60
|
||||
@@ -6,8 +6,8 @@
|
||||
# Edit at your own risk! DANGER DANGER.
|
||||
|
||||
|
||||
if test -f "/warewulf/config"; then
|
||||
. /warewulf/config
|
||||
if test -f "@WWCLIENTDIR@/config"; then
|
||||
. @WWCLIENTDIR@/config
|
||||
else
|
||||
echo "ERROR: Warewulf configuration file not found... rebooting in 1 minute"
|
||||
sleep 60
|
||||
@@ -24,7 +24,7 @@ mount -t devtmpfs devtmpfs /dev
|
||||
mount -t sysfs sysfs /sys
|
||||
mount -t tmpfs tmpfs /run
|
||||
|
||||
chmod 755 /warewulf/wwinit
|
||||
chmod 755 @WWCLIENTDIR@/wwinit
|
||||
|
||||
echo "Checking Rootfs type"
|
||||
ROOTFSTYPE=`stat -f -c "%T" /`
|
||||
@@ -32,7 +32,7 @@ ROOTFSTYPE=`stat -f -c "%T" /`
|
||||
if test "$WWROOT" = "initramfs"; then
|
||||
echo "Provisioned to default initramfs file system: $ROOTFSTYPE"
|
||||
echo "Calling WW Init"
|
||||
exec /warewulf/wwinit
|
||||
exec @WWCLIENTDIR@/wwinit
|
||||
elif test "$WWROOT" = "tmpfs"; then
|
||||
if test "$ROOTFSTYPE" = "tmpfs"; then
|
||||
echo "ERROR: Switching the root file system requires the kernel argument: 'rootfstype=ramfs'"
|
||||
@@ -44,7 +44,7 @@ elif test "$WWROOT" = "tmpfs"; then
|
||||
tar -cf - --exclude ./proc --exclude ./sys --exclude ./dev --exclude ./newroot . | tar -xf - -C /newroot
|
||||
mkdir /newroot/proc /newroot/dev /newroot/sys /newroot/run 2>/dev/null
|
||||
echo "Calling switch_root and invoking WW Init"
|
||||
exec /sbin/switch_root /newroot /warewulf/wwinit
|
||||
exec /sbin/switch_root /newroot @WWCLIENTDIR@/wwinit
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Unknown Warewulf Root file system: $WWROOT"
|
||||
Reference in New Issue
Block a user