mkjail.sh

Check-in [b74ac07ea7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Show help if no version is provided
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:b74ac07ea7fccf6bc7889aab5715981495db2041f450c5516b65cba912af03c4
User & Date: feld 2018-10-04 14:39:59
Context
2018-10-04
14:41
Set a default variable for VERSION check-in: 1d6629c0d9 user: feld tags: master, trunk
14:39
Show help if no version is provided check-in: b74ac07ea7 user: feld tags: master, trunk
14:38
Give full path to pkg-static check-in: f069590bad user: feld tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/share/mkjail/upgrade.sh.

1
2
3
4
5
6
7

8
9
10
11
12
13
14
..
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
...
114
115
116
117
118
119
120
121




122
#!/bin/sh
set -e
set -u
trap _cleanup HUP INT QUIT KILL TERM ABRT

aflag=0
jflag=0

PAGER=cat
SNAPNAME="mkjail-$(date '+%Y%m%d%H%M')"

_upgradejail()
{
    _validate
    _snapshot
................................................................................
    case "${opt}" in
        a)  aflag=1
            ;;
        h)  show_help
            ;;
        j)  jflag=1; JAILNAME=${OPTARG}
            ;;
        v)  VERSION=${OPTARG}
            ;;
        *)  show_help
            ;;
    esac
done

if [ ${aflag} = 1 ] && [ ${jflag} = 1 ]; then
................................................................................
if [ ${aflag} = 1 ]; then
    _alljails
fi

if [ ${jflag} = 1 ]; then
    _upgradejail
fi





[ $# -lt 1 ] && show_help







>







 







|







 








>
>
>
>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/sh
set -e
set -u
trap _cleanup HUP INT QUIT KILL TERM ABRT

aflag=0
jflag=0
vflag=0
PAGER=cat
SNAPNAME="mkjail-$(date '+%Y%m%d%H%M')"

_upgradejail()
{
    _validate
    _snapshot
................................................................................
    case "${opt}" in
        a)  aflag=1
            ;;
        h)  show_help
            ;;
        j)  jflag=1; JAILNAME=${OPTARG}
            ;;
        v)  vflag=1; VERSION=${OPTARG}
            ;;
        *)  show_help
            ;;
    esac
done

if [ ${aflag} = 1 ] && [ ${jflag} = 1 ]; then
................................................................................
if [ ${aflag} = 1 ]; then
    _alljails
fi

if [ ${jflag} = 1 ]; then
    _upgradejail
fi

if [ ${vflag} = 0 ]; then
    show_help
fi

[ $# -lt 1 ] && show_help