Skip to content

Commit 2f89853

Browse files
mirabilosmirabilos
mirabilos
authored andcommitted
solve the sorting problem
1 parent 4f87318 commit 2f89853

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

posix/sysadmin/debfstab.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/sh
2+
# -*- mode: sh -*-
23
#-
3-
# Copyright © 2020, 2021
4-
# mirabilos <m@mirbsd.org>
4+
# Copyright © 2020, 2021, 2025
5+
# mirabilos <m$(date +%Y)@mirbsd.de>
56
# Copyright © 2022
67
# mirabilos <[email protected]>
78
#
@@ -100,6 +101,7 @@ debfstab() (
100101
nl='
101102
'
102103
{
104+
writeln "#spec 'file' vfstype mntopts freq passno"
103105
writeln '#/dev/... swap swap sw,discard=once 0 0configureyourswapdevice(s)here'
104106
writeln 'swap /tmp tmpfs defaults,noatime,nosuid,nodev 0 0configuretotaste'
105107
findmnt --real -abnrUuvo FSTYPE,TARGET,SOURCE,FSROOT,OPTIONS,LABEL,UUID,PARTLABEL,PARTUUID,FSTYPE | \
@@ -198,10 +200,7 @@ debfstab() (
198200
test x"$hasroot" = x"1" || \
199201
writeln '/dev/... / ... defaults 0 1makesuretoconfigure'
200202
}
201-
} | sort -k2,2 -k1 | {
202-
writeln '#spec file vfstype mntopts freq passno'
203-
cat
204-
} | column -t | sed \
203+
} | sort -k2,2 -k1 | column -t | sed \
205204
-e "1s/\$/\\${nl}/" \
206205
-e "s/^\\(.*\\)\\(.*\\)\$/# \\2\\${nl}\\1/" \
207206
-e "s// /g" \

0 commit comments

Comments
 (0)