-
Notifications
You must be signed in to change notification settings - Fork 2
/
ramfs
executable file
·1378 lines (1292 loc) · 66.7 KB
/
ramfs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#! /usr/bin/env bash
# ramfs - Add or remove a memory-backed filesystem on MacOS X. Please note
# that this is not a tmpfs-like filesystem which will be paged out
# where possible to ease memory-pressure on the host system, but
# instead all data remains locked in physical memory until freed.
#
# TODO: Add '--create'/'--mount' option (which may be a no-op) to
# mirror '--unmount'?
#
declare -i debug="${DEBUG:-0}"
declare -i trace="${TRACE:-0}"
declare DEFAULT_PATH="/Volumes"
declare DEFAULT_NAME="Scratch"
declare DEFAULT_FS="hfsx"
declare space='\s'
declare sed='sed'
declare sedopt='-r'
declare b64='base64'
declare b64opt='-d'
declare numfmt='numfmt'
set -u
function print() {
if (( debug )); then
if [[ -n "${*:-}" ]]; then
printf 'DEBUG: %s\n' "${*:-}"
else
printf '\n'
fi
fi
return $(( ! debug ))
} # print
function warn() {
if [[ -n "${*:-}" ]]; then
printf 'WARNING: %s\n' "${*:-}"
else
printf '\n'
fi
} # warn
function error() {
if [[ -n "${*:-}" ]]; then
printf 'ERROR: %s\n' "${*:-}" >&2
else
printf '\n' >&2
fi
} # error
function fatal() {
if [[ -n "${*:-}" ]]; then
printf 'FATAL: %s\n' "${*:-}" >&2
else
printf '\n' >&2
fi
} # fatal
function requires() {
local files="${*:-}"
local item
local -i or=0 rc=0
[[ -n "${files:-}" ]] || return 1
if [[ "${1}" =~ -?-or? ]]; then
shift
if ! [[ -n "${1:-}" ]]; then
return 1
elif ! [[ -n "${1:-}" && -n "${2:-}" ]]; then
print "Disabling 'or' functionality with only two parameters"
else
files="${*:-}"
or=1
fi
fi
for item in ${files}; do
if type -pf "${item}" >/dev/null 2>&1; then
if (( or )); then
type -pf "${item}"
return 0
fi
else
fatal "Cannot locate required '${item}' binary"
rc=1
fi
done
if (( or )); then
fatal "Cannot locate required binary from '${files// /', '}'" |
rev | sed "s/' ,'/' ro '/" | rev >&2
rc=1
fi
return ${rc}
} # requires
function checkforgnused() {
local -i rc=0
if sed --version >/dev/null 2>&1; then
sed='sed'
sedopt='-r'
space='\s'
else
sed='sed'
sedopt='-E'
space='[[:space:]]'
rc=1
fi
return ${rc}
} # checkforgnused
function checkforgnub64() {
local -i rc=0
if [[ "$( base64 -d <<<'dGVzdAo=' 2>/dev/null )" == "test" ]]; then
b64='base64'
b64opt='-d'
else
b64='base64'
b64opt='-D'
rc=1
fi
return ${rc}
} # checkforgnub64
function usage() {
local name
if readlink --version >/dev/null 2>&1; then
name="$( basename "$( readlink -e "${BASH_SOURCE:-${0}}" )" )"
else
name="$( basename "${BASH_SOURCE:-${0}}" )"
fi
#amfs --unmount <path>
#amfs --size <size> [--name <label>] [--filesystem <format>] [--mount <path>]
# [--allow-suid]
# 'size' may be expressed in IEC units, e.g. 512M, 2G, etc.
# 'path' will be created if it does not exist, but should be empty
# To view the available filesystem formats, use 'format' "help"
#
echo "${name} --unmount <path>"
echo "${name} --size <size> [--name <label>] [--filesystem <format>]" \
"[--mount <path>]"
echo "${name//?/ } [--allow-suid] [--enable-owners]"
echo "${name//?/ } 'size' may be expressed in IEC units, e.g. 512M," \
"2G, etc."
echo "${name//?/ } 'path' will be created if it does not exist, but" \
"should be empty"
echo "${name//?/ } To view the available filesystem formats, use" \
"'format' \"help\""
return 0
} # usage
function attach() {
local size="${1:-}" ; shift
local mp="${1:-}" ; shift
local name="${1:-}" ; shift
local fs="${1:-}" ; shift
local -i suid="${1:-0}" ; shift
local -i squash="${1:-1}" ; shift
local -i totalsize wiredsize reqsize
totalsize=$( sysctl hw.memsize | cut -d' ' -f 2 )
wiredsize=$(( $(
vm_stat \
| grep '^Pages wired down:' \
| grep -o '[0-9]\+\.$' \
| cut -d'.' -f 1
) * $(
vm_stat \
| grep -o 'page size of [0-9]\+ bytes' \
| cut -d' ' -f 4
) ))
if ! reqsize=$( ${numfmt} --from=si --to=none <<<"${size}" ); then
error "Unable to convert '${size}' from SI size to numeric value"
rc=1
fi
if (( reqsize >= totalsize )); then
error "Requested memory size ($(
${numfmt} --from=none --to=iec <<<"${reqsize}"
)) is greater than the total amount of physical memory present" \
"on this host ($(
${numfmt} --from=none --to=iec <<<"${totalsize}"
))"
rc=1
fi
if (( reqsize >= ( totalsize - wiredsize ) )); then
error "Requested memory size ($(
${numfmt} --from=none --to=iec <<<"${reqsize}"
)) is greater than the amount of non-wired memory present" \
"on this host ($(
${numfmt} --from=none --to=iec <<<"$(( totalsize - wiredsize ))"
))"
rc=1
fi
if (( reqsize < 128 << 20 )); then
error "Not creating ramdisk smaller than 128M in size"
rc=1
fi
unset wiredsize totalsize
(( rc )) && return 1
print "Accepting size of '${size}' (${reqsize})"
# If we're mounting beneath /Volumes/, Mac OS sorts everything out for us
#
if [[ -n "${mp:-}" ]]; then
echo >&2 "Using non-default mount-point of '${mp}'"
if [[ -e "${mp}" ]]; then
if ! [[ -d "${mp}" ]]; then
error "'${mp}' exists but is not a directory"
return 1
else
if ((
$( find "${mp}"/ -mindepth 1 -maxdepth 1 -print | wc -l )
)); then
warn >&2 "Directory '${mp}' is not empty"
fi
fi
else
local -i writable=0
local parent="${mp}"
while [[ "${parent}" != '/' && "${parent}" != '.' ]]; do
parent="$( dirname "${parent}" )"
if [[ -e "${parent}" ]]; then
if [[ -d "${parent}" ]]; then
if [[ -w "${parent}" ]]; then
writable=1
break
else
error "Parent '${parent}' of specified directory" \
"'${mp}' exists but cannot be written to"
return 1
fi
else
error "Parent '${parent}' of specified directory" \
"'${mp}' exists but is not a directory"
return 1
fi
fi
done
if ! (( writable )); then
error "Could not locate writable parent directory for '${mp}'"
return 1
else
if ! mkdir -p "${mp}" >/dev/null 2>&1; then
error "mkdir() on '${mp}' failed: ${?}"
return 1
fi
fi
fi
fi
unset com_apple_hdid_verbose com_apple_hdid_debug
unset com_apple_hdid_nokernel com_apple_hdid_kernel
unset com_apple_diskimages_insecureHTTP
local output device
local -i blocks=$(( reqsize / 512 ))
echo -n "Creating ramdisk of $(
${numfmt} --from=none --to=si <<<"${reqsize}"
)B/$(
${numfmt} --from=none --to=iec-i <<<"${reqsize}"
)B (${blocks} 512k blocks) ... "
device="$(
hdiutil attach -mount suppressed ram://${blocks} 2>/dev/null \
| ${sed} ${sedopt} "s/^${space}+// ; s/${space}+$//"
)"
if ! [[ "${device:-}" =~ ^/dev/disk[0-9]+(s[0-9]+)?$ ]]; then
echo "[ FAIL ]"
fatal "Read unlikely device '${device:-}' for ramdisk"
[[ -n "${device:-}" ]] && detach "${device}"
return 1
fi
echo "[ OK ]"
if [[ -n "${mp:-}" ]]; then
echo -n "Mounting device '${device:-}' on '${mp}' ... "
if output="$( diskutil mount -mountPoint "${mp}" "${device}" 2>&1 )"
then
echo "[ OK ]"
else
echo "[ FAIL ]"
false
fi
(( rc = ${?} ))
(( debug || rc )) && printf '\n%s\n' "${output}"
if (( rc )); then
error "Failed to mount '${device}' on '${mp}'"
(( debug )) || detach "${device}"
return 1
fi
fi
echo -n "Formatting ramdisk '$( basename -- "${device}" )' with '${fs}'" \
"filesystem ... "
name="${name:-${DEFAULT_NAME}}"
local command="diskutil eraseVolume \"${fs}\" \"${name}\" \"${device}\""
[[ "${fs}" =~ APFS ]] &&
command="diskutil partitionDisk \"${device}\" 1 GPT \"${fs}\" \"${name}\" 100%"
if output="$( eval "${command}" 2>&1 )"
then
echo "[ OK ]"
else
echo "[ FAIL ]"
false
fi
(( rc = ${?} ))
(( debug || rc )) && [[ -n "${output:-}" ]] && printf '\n%s\n' "${output}"
if [[ "${fs}" =~ APFS ]]; then
# Awkwardly, APFS creates a new disk and so we need to adjust $device
local d
local -i n
d="$( ${sed} ${sedopt} 's/^(.*)[0-9]+$/\1/' <<<"${device}" )"
(( n = $( ${sed} ${sedopt} 's/^.*([0-9]+)$/\1/' <<<"${device}" ), n++ ))
if [[ -b "${d}${n}" ]]; then
print "Adjusting APFS device node from '${device}' to '${d}${n}s1'"
device="${d}${n}s1"
fi
fi
local mp
if ! mount | grep -Eq "^${device}(s[0-9]+)? on "; then
fatal "Failed to confirm mount of '${device}'"
(( debug )) || detach "${device}"
return 1
else
mp="$(
mount \
| grep -E "^${device}(s[0-9]+)? on " \
| cut -d' ' -f 3- \
| cut -d'(' -f 1 \
| ${sed} ${sedopt} "s/${space}+$//"
)"
if [[ -d "${mp:-}" ]]; then
if requires ${b64} bzip2 bunzip2 SetFile > /dev/null 2>&1; then
grep '^# DATA: ' "${BASH_SOURCE:-${0}}" \
| sed 's/^# DATA: //' \
| ${b64} ${b64opt} \
| bunzip2 -c > "${mp}"/.VolumeIcon.icns
SetFile -a C "${mp}"/
fi
{
touch "${mp}"/.metadata_never_index
touch "${mp}"/.fseventsd/no_log
mkdir "${mp}"/tmp
chmod 1777 "${mp}"/tmp
chflags hidden "${mp}"/tmp
(( EUID )) || chown root:wheel "${mp}"/tmp
} >/dev/null 2>&1
fi
fi
# Try to enable multi-user support, but don't be too concerned if this
# fails...
local flags=""
if (( EUID )); then
local notice=0
if (( suid )); then
warn "\\nCannot enable 'suid' flag if not run as root"
notice=1
fi
if ! (( squash )); then
# If owners are enabled, then the user performing the mount can't
# write to the filesystem root! As a hack, create a 'Contents'
# directory (with appropriate permissions) before enabling owner
# support.
#
# FIXME: Is there a way to have a non-root mount with owner
# support?
#
mkdir "${mp}"/Contents
flags="${flags:+,}owners"
(( notice )) || echo >&2
echo >&2 "Please use the 'Contents' sub-directory to store" \
"data"
notice=1
fi
if ! (( notice )); then
echo >&2
echo >&2 "Please run as root to enable multi-user or" \
"SUID support"
fi
unset notice
else
# If actualy fact, enabling either of these seems to remove
# 'nodev, nosuid, noowners', regardless of which is specified...
if (( suid )); then
flags+="${flags:+,}suid"
fi
if ! (( squash )); then
flags="${flags:+,}owners"
fi
fi
# This resets the mount-point owner (which is why we need Contents unless
# run as root), and setting 'suid' appears to also remove 'nodev'...
#
if [[ -n "${flags}" ]]; then
mount -u -o ${flags} "${device}"
fi
if ! (( EUID )); then
if (( suid || !( squash ) )); then
# We could simply use SUDO_UID and SUDO_GID here (as 'sudo' will
# have clobbered our original UID, and UID==EUID at this point) but
# this does open us up to malfeasance on the part of the user, so
# at least this way we can confirm that the SUDO_UID ID does
# actually exist...
#
local -i uid gid
uid="$( id "${SUDO_UID:-501}" | grep -ow 'uid=[0-9]\+' | cut -d'=' -f 2 )"
gid="$( id "${SUDO_UID:-501}" | grep -ow 'gid=[0-9]\+' | cut -d'=' -f 2 )"
if (( uid || gid )); then
chown "${uid}:${gid}" "${mp}"/.
fi
fi
fi
return ${rc}
} # attach
function detach() {
local mp="${1:-}" ; shift
local device output
local -i rc=0
if [[ -z "${mp:-}" ]]; then
error "A device or path to unmount is required"
return 1
fi
# TODO: Examine 'diskutil list' output for "Physical Store" indicators for
# APFS volumes, and recursively unmount.
if [[ "${mp}" =~ ^/dev/ ]]; then
device="${mp}"
mount | grep -q "^${device} on " ||
warn >&2 "Specified device '${device}' does not appear to be" \
"mounted"
mp="$(
mount \
| grep "^${device} on " \
| cut -d' ' -f 3- \
| cut -d'(' -f 1 \
| ${sed} ${sedopt} "s/${space}+$//"
)"
if [[ -n "${mp:-}" ]]; then
[[ -d "${mp}" ]] ||
warn >&2 "Mount-point '${mp}' does not exist"
fi
else
if ! [[ -d "${mp}" || -d /Volumes/"${mp}" ]]; then
error "Specified mount-point '${mp}' does not exist"
return 1
fi
if ! mount | grep -Eq " on (/Volumes/)?${mp%%/} "; then
error "Specified mount-point '${mp}' does not appear to be active"
return 1
fi
device="$( mount | grep -E " on (/Volumes/)?${mp%%/} " | cut -d' ' -f 1 )"
fi
if ! [[ "${device}" =~ ^/dev/disk[0-9]+(s[0-9]+)?$ ]]; then
fatal "Read unlikely device '${device}' for mount-point '${mp}'"
return 1
fi
if [[ -n "${mp:-}" ]]; then
echo -n "Unmounting device '${device}' from mount-point '${mp}' ... "
if output="$( diskutil unmountDisk "${device}" 2>&1 )"; then
echo "[ OK ]"
else
echo "[ FAIL ]"
false
fi
(( rc = ${?} ))
(( debug || rc )) && printf '\n%s\n' "${output}"
fi
echo -n "Detaching device '${device}' ... "
if output="$( hdiutil detach "${device}" 2>&1 )"; then
echo "[ OK ]"
else
echo "[ FAIL ]"
false
fi
(( rc += ${?} ))
(( debug || rc )) && printf '\n%s\n' "${output}"
[[ -d "${mp}" ]] && rmdir "${mp}" >/dev/null 2>&1
return ${rc}
} # detach
function main() {
#local script="$( basename "$( readlink -e "${BASH_SOURCE:-${0}}" )" )"
local script
if readlink --version >/dev/null 2>&1; then
script="$( basename "$( readlink -e "${BASH_SOURCE:-${0}}" )" )"
else
script="$( basename "${BASH_SOURCE:-${0}}" )"
fi
local fs mp name size
local -i suid=0 squash=1
declare OPTARG
declare -i OPTIND=1 OPTERR=1
# If the first character in ${options} is a colon, then enable silent
# error reporting. Thereafter, a colon following a character indicates
# that a mandatory parameter is expected to follow this option.
#
local options=":haof:m:n:s:u-:"
local optchr value option
local -i rc=0
# Variables passed to 'getopts' aren't expanded by shellcheck :(
# shellcheck disable=SC2214
while getopts -- "${options}" optchr; do
case "${optchr}" in
-)
case "${OPTARG}" in
help)
usage
return 0
;;
allow-suid|suid)
suid=1
;;
owners|enable-owners|multiuser|nosquash)
squash=0
;;
fs|filesystem)
value="${!OPTIND:-}"
(( OPTIND++ ))
fs="${value:-}"
print "Parsing option: '--${OPTARG}', value: '${value:-}'"
;;
fs=*|filesystem=*)
value="${OPTARG#*=}"
option="${OPTARG%=${value:-}}"
fs="${value:-}"
print "Parsing option: '--${option}', value: '${value:-}'"
;;
mp|mount|mountpoint)
value="${!OPTIND:-}"
(( OPTIND++ ))
mp="${value:-}"
print "Parsing option: '--${OPTARG}', value: '${value:-}'"
;;
mp=*|mount=*|mountpoint=*)
value="${OPTARG#*=}"
option="${OPTARG%=${value:-}}"
mp="${value:-}"
print "Parsing option: '--${option}', value: '${value:-}'"
;;
name)
value="${!OPTIND:-}"
(( OPTIND++ ))
name="${value:-}"
print "Parsing option: '--${OPTARG}', value: '${value:-}'"
;;
name=*)
value="${OPTARG#*=}"
option="${OPTARG%=${value:-}}"
name="${value:-}"
print "Parsing option: '--${option}', value: '${value:-}'"
;;
size)
value="${!OPTIND:-}"
(( OPTIND++ ))
size="${value:-}"
print "Parsing option: '--${OPTARG}', value: '${value:-}'"
;;
size=*)
value="${OPTARG#*=}"
option="${OPTARG%=${value:-}}"
size="${value:-}"
print "Parsing option: '--${option}', value: '${value:-}'"
;;
umount|unmount|detach)
value="${!OPTIND:-}"
(( OPTIND++ ))
mp="${value:-}"
print "Parsing option: '--${OPTARG}', value: '${value:-}'"
detach "${mp}"
return ${?}
;;
umount=*|unmount=*|detach=*)
value="${OPTARG#*=}"
option="${OPTARG%=${value:-}}"
mp="${value:-}"
print "Parsing option: '--${option}', value: '${value:-}'"
detach "${mp}"
return ${?}
;;
*)
if (( 1 == OPTERR )) && [[ "${options:0:1}" != ":" ]]
then
warn >&2 "${script}: Unknown option '--${OPTARG}'"
rc=1
fi
;;
esac
;;
h)
usage
return 0
;;
a)
suid=1
;;
o)
squash=0
;;
f)
value="${OPTARG:-}"
fs="${value:-}"
print " Parsing option: '-${optchr:-}', value: '${value:-}'"
;;
m)
value="${OPTARG:-}"
mp="${value:-}"
print " Parsing option: '-${optchr:-}', value: '${value:-}'"
;;
n)
value="${OPTARG:-}"
name="${value:-}"
print " Parsing option: '-${optchr:-}', value: '${value:-}'"
;;
s)
value="${OPTARG:-}"
size="${value:-}"
print " Parsing option: '-${optchr:-}', value: '${value:-}'"
;;
u)
value="${OPTARG:-}"
mp="${value:-}"
print " Parsing option: '-${optchr:-}', value: '${value:-}'"
detach "${mp:-${DEFAULT_PATH}/${DEFAULT_NAME}}"
return ${?}
;;
*)
if (( 1 != OPTERR )) || [[ "${options:0:1}" == ":" ]]; then
warn >&2 "${script}: Required argument missing or" \
"unknown option '-${OPTARG}'"
rc=1
fi
;;
esac
done
unset option value optchr options
if [[ -n "${fs:-}" && "${fs}" == "help" ]]; then
diskutil listFilesystems
return 0
fi
if [[ -z "${size:-}" ]]; then
usage
return 1
fi
if [[ -n "${fs:-}" ]]; then
if ! {
diskutil listFilesystems \
| grep '(or)' \
| cut -d' ' -f 4
diskutil listFilesystems \
| grep '\s\s\+' \
| ${sed} ${sedopt} 's/\s\s+.*$//' \
| grep -Ev '^(PERSONALITY|)$' \
| sort \
| uniq
echo 'APFSX'
} | grep -Fiqw "${fs}"; then
error "'${fs}' is not a recognised filesystem personality. " \
"Recognised types are:\\n"
diskutil listFilesystems >&2
rc=1
elif [[ "${fs}" == 'APFSX' ]]; then
fs='Case-sensitive APFS'
fi
fi
(( rc )) && return 1
name="${name:-${DEFAULT_NAME:-}}"
fs="${fs:-${DEFAULT_FS:-}}"
attach "${size:-}" "${mp:-}" "${name:-}" "${fs:-}" \
"${suid:-0}" "${squash:-1}"
return ${?}
} # main
requires diskutil hdiutil || exit 1
if ! numfmt="$( requires --or numfmt gnumfmt )"; then
echo >&2 " (Try installing Homebrew from https://brew.sh/?)"
exit 1
fi
checkforgnused
checkforgnub64
(( trace )) && set -o xtrace
main "${@:-}"
(( trace )) && set +o xtrace
exit ${?}
# Source: http://www.iconarchive.com/show/simple-icons-by-harwen/RAM-Drive-icon.html
# License: Free for non-commercial use, commercial usage not allowed.
#
# Begin image data
# DATA: QlpoOTFBWSZTWfbZDrcAMS1/////////////////////////////////////////////4F5
# DATA: c8A+KQihVAoRAp9sO2U95913rdZI++brrtnrw6ena7vd6qve3Xp3O9mu3r77HSl2d29Pky3
# DATA: Y6N2AA0GgAoAKB6BodB7segUHo5Wseh6N7Hpew9Jdt3bqs7u9V7VG63t326+vNlXzvTva1r
# DATA: e7dq2pqvKvVeVvdZ7X2dx90A3vXwBWQ+j3aVdH1XDq726hy23W603Tlwq21a1d3cLpWXObt
# DATA: fO857j7vOsalt13U9XPe7vDt7tu4Wu41bdru3O7Oto6ra72d42dlG03vo+33fVu7nWUJvMa
# DATA: nO7rd3U9aetOrX3b73coAwM9UmgAAGQAEyYmTTATBMAAmJiYJqemmBMEYmJgEwFT2JiYImw
# DATA: JhMBT0yYhkwTJgTAmCYAAJgAAShnqiNNAAmRgAmATEZPU0epowmm0RtCniYEyaaMATJkYjA
# DATA: maAABo0JiYADQAaZARpqbTSe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