clear; read -p "Желаемый размер раздела в GB? = " s; ((s= 10**9*s/512)); read -p "Введите название раздела? = " n; cn=`scutil --get ComputerName`; mac_addr=`ifconfig en0 | grep "ether"`; mac_addr=${mac_addr#*ether}; mac_addr=${mac_addr// /}; mac_addr=${mac_addr//:/}; read -p "Точка Монтирования = " mp; sudo hdiutil create -size ${s}b -fs JHFS+X -volname "${n}" -type SPARSEBUNDLE "/Volumes/${mp}/${cn}_${mac_addr}.sparsebundle" && echo "Done" Желаемый размер раздела в GB? = 10 Введите название раздела? = rrr Точка Монтирования = Data Password: hdiutil: create failed - Operation not permitted It does not work, while the file /Volumes/Data/Air_60c22700b922.sparsebundle is created, but "there are no connected file systems"
clear; read -p "Желаемый размер раздела в GB? = " s; ((s= 10**9*s/512)); read -p "Введите название раздела? = " n; cn=`scutil --get ComputerName`; mac_addr=`ifconfig en0 | grep "ether"`; mac_addr=${mac_addr#*ether}; mac_addr=${mac_addr// /}; mac_addr=${mac_addr//:/}; read -p "Точка Монтирования = " mp; sudo hdiutil create -size ${s}b -fs JHFS+X -volname "${n}" -type SPARSEBUNDLE "/Volumes/${cn}_${mac_addr}.sparsebundle" && sudo mv "/Volumes/${cn}_${mac_addr}.sparsebundle" "/Volumes/${mp}" && echo "Done" Желаемый размер раздела в GB? = 10 Введите название раздела? = rrr Точка Монтирования = Data created: /Volumes/Air_60c22700b922.sparsebundle Done ls -@ln /Volumes/Data/Air_60c22700b922.sparsebundle total 16 -rwxrwxrwx 1 501 0 498 18 окт 03:50 Info.bckup -rwxrwxrwx 1 501 0 498 18 окт 03:50 Info.plist drwxrwxrwx 1 501 0 432 18 окт 03:50 bands -rwxrwxrwx 1 501 0 0 18 окт 03:50 token Works
What am I doing wrong?
Thanks in advance for your help!
PS
uname -a Darwin Air.local 13.4.0 Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST 2016; root:xnu-2422.115.15~1/RELEASE_X86_64 x86_64 GNU bash, версия 4.4.0(1)-release (x86_64-apple-darwin13.4.0) Data is the name of the network drive Time Capsule