apt-get update를 실행할 때 실패하면 0이 아닌 오류 코드를 반환해야 하지만 제 경우에는 여전히 0이었습니다. 아래를 참조하세요:
root@ubuntu-base:/home/user# apt-get update
Err http://security.ubuntu.com trusty-security InRelease
Err http://packages.siawai.com:8085 trusty InRelease
Err http://ppa.launchpad.net trusty InRelease
Err http://ppa.launchpad.net trusty Release.gpg
Could not resolve 'ppa.launchpad.net'
Err http://security.ubuntu.com trusty-security Release.gpg
Could not resolve 'security.ubuntu.com'
Err http://packages.siawai.com:8085 trusty Release.gpg
Could not resolve 'packages.siawai.com'
Err http://in.archive.ubuntu.com trusty InRelease
Err http://in.archive.ubuntu.com trusty-updates InRelease
Err http://in.archive.ubuntu.com trusty-backports InRelease
Err http://in.archive.ubuntu.com trusty Release.gpg
Could not resolve 'in.archive.ubuntu.com'
Err http://in.archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'in.archive.ubuntu.com'
Err http://in.archive.ubuntu.com trusty-backports Release.gpg
Could not resolve 'in.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://packages.siawai.com:8085/repos/dists/trusty/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://packages.siawai.com:8085/repos/dists/trusty/Release.gpg Could not resolve 'packages.siawai.com'
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/trusty/Release.gpg Could not resolve 'ppa.launchpad.net'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'in.archive.ubuntu.com'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'in.archive.ubuntu.com'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg Could not resolve 'in.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@ubuntu-base:/home/user# echo $?
0
무엇이 문제일까요? 저는 우분투 14.04를 실행하고 있습니다.
답변1
이것은 의도적인 것입니다.#778357:
결과는 의미가 있습니다. 0은 성공 또는 일시적 오류를 나타내고 다른 값은 지속적인 오류를 나타냅니다.