Article 6J2SS Slackware(64) 15.0 - /etc/rc.d/rc.local is not working

Slackware(64) 15.0 - /etc/rc.d/rc.local is not working

by
inukaze
from LinuxQuestions.org on (#6J2SS)
Hi there, for unknow reasons this is not working during boot. the current content /etc/rc.d/rc.local file are the follow :

Code:#!/bin/bash
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local startup commands in here. Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

echo 'Ejecutando : /etc/rc.d/rc.local'

# Sincronizar Hora al Iniciar el Sistema :
echo 'Sincronizar Hora'
ntpdate=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b ntpdate | grep -i "ntpdate" | cut -d " " -f02 | cut -c11-20)
service=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b service | grep -i "service" | cut -d " " -f02 | cut -c11-20)
rcntpd="/etc/rc.d/rc.ntpd"

if [ -z "$ntpdate" ]; then
echo
echo "ntpdate no esta instalado en tu sistema operativo GNU"
echo "Por favor, primero instale : ntpdate"
echo
exit 0
fi

if [ -d "/etc/rc.d" ];then
if [ -f "$rcntpd" ]; then
chmod +x "$rcntpd"
2>/dev/null 1>/dev/null "$rcntpd" "stop" &> /dev/null
#rm "/etc/localtime"
#ln -sf "/usr/share/zoneinfo/America/Caracas" "/etc/localtime"
#echo ""
CloudFlare=$(ping -c 1 1.1.1.1 | sed -n '5p' | cut -c 24-33)
if [ "$CloudFlare" == "1 received" ]; then
2>/dev/null 1>/dev/null "ntpdate" "pool.ntp.org" &> /dev/null
sleep 3
hwclock -w
fi
2>/dev/null 1>/dev/null "$rcntpd" "start" &> /dev/null
echo ""
fi
fi

#Montar Carpeta Compartida mediante el Protocolo CIFS :
echo 'Montar la Carpeta Compartida (CIFS, NO SMB) :'
CarpComp=$(ping -c 1 10.48.1.220 | sed -n '5p' | cut -c 24-33)

if [ "$CarpComp" == "1 received" ]; then
mkdir -p /media/Tecnologia
mkdir -p /media/Soporte
$(mount -t cifs //10.48.1.220/Tecnologia /media/Tecnologia -o username=user,password=us3rp4ssw0rd,uid=1000,gid=1000,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777,domain=FUNDAPROAL) &
$(mount -t cifs //10.48.1.220/Soporte /media/Soporte -o username=user,password=us3rp4ssw0rd,uid=1000,gid=1000,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777,domain=FUNDAPROAL) &
fi

if [ -x /etc/rc.d/rc.qemu-ga ]; then
# Start QEMU Guest Agent:
echo "Starting QEMU Guest Agent: /etc/rc.d/rc.qemu-ga start"
/etc/rc.d/rc.qemu-ga start
fiAfter i write all things i want inside that file i use the follow commands :

su -c "chmod 755 /etc/rc.d/rc.local ; chmod +x /etc/rc.d/rc.local" root
- Ask for the password, i put and press enter
- i restart the system, and is not working.

The current Desktop Env i am using is : KDE Plasma.

What i am doing wrong ?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments