summaryrefslogtreecommitdiffstats
path: root/defaultenv-2/menu/menu/boot-menu-new-boot-entry
blob: c5e982cdb2512b5b230a70309905e74894aa7607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

name=

readline "Name of the new entry: " name

if [ -z "$name" ]; then
	exit 1
fi

if [ -e "/env/boot/$name" ]; then
	echo "entry $name already exists"
	readline "<enter>" unused
	exit 1
fi

cp /env/data/boot-template /env/boot/$name

edit /env/boot/$name

boot-menu-show rebuild