개발자/Raspberry Pi3

자동 실행 /etc/rc.local 에서 실행이 잘 안되는 경우

지구빵집 2019. 8. 29. 16:18
반응형

 

자동 실행 /etc/rc.local 에서 실행이 잘 안되는 경우

※ 라즈베리파이3 B or B+ 스크립트 자동 실행 /etc/rc.local 에서 실행이 잘 안되는 경우

$sudo nano /etc/profile.d/bash_completion.sh

 

이 파일을 열어서 명령줄을 추가할 것. 내용은 아래 코드를 참고할 것

 

# Check for interactive bash and that we haven't already been sourced.
if [ -n "$BASH_VERSION" -a -n "$PS1" -a -z "$BASH_COMPLETION_COMPAT_DIR" ]; then

# Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then
    [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \
        . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
    if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then
        # Source completion code.
        . /usr/share/bash-completion/bash_completion
    fi
fi
unset bash bmajor bminor

fi

 

 

 

 

 

반응형