Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

bash in need of some clarafication

Started by klein5366, January 18, 2017, 04:09:36 AM

Previous topic - Next topic

klein5366

i Just installed sparkylinux-4.5.2-i686-lxqt.iso and have a previous version installed on another computer.
i'm use to ubuntu, i started with ubuntu 5.10, 10 + years ago.
i have some setup scrips i like to use like this one:

#! /bin/bash
USER=klein

apt_update_reboot.sys(){
    mkdir /usr/mysbin
    cp -r ~/install_software/my-scripts/apt_update_reboot.sh /usr/mysbin/apt_update_reboot.sh
    chown root:root /usr/mysbin/apt_update_reboot.sh
    chmod 755 /usr/mysbin/apt_update_reboot.sh
    cp -r /etc/crontab /etc/crontab.org
    echo "00 01    * * *    root    /usr/mysbin/apt_update_reboot.sh"  >>  /etc/crontab
    touch /etc/libuser.conf   
}


apt_update_reboot.sys


but when i run it from the command line i get this :

lucas@lucas:~/Desktop$ sudo ./0101install.sh
cp: cannot stat '/root/install_software/my-scripts/apt_update_reboot.sh': No such file or directory
chown: cannot access '/usr/mysbin/apt_update_reboot.sh': No such file or directory
chmod: cannot access '/usr/mysbin/apt_update_reboot.sh': No such file or directory
lucas@lucas:~/Desktop$


this script runs fine in ubuntu, and as far as i can tell both bash versions are the same, i looked at both bashrc files and they look the same.
could someone point me in the right direction ? 

View the most recent posts on the forum