autoinstall early-commands
Ralf Mardorf
kde.lists at yahoo.com
Sat Jan 16 17:24:53 UTC 2021
On Sat, 16 Jan 2021 09:25:03 -0500, Jerry Geis wrote:
>I am trying to write some commands in the early-commands section that
>needs to check if /dev/sda1 exists, if so mount it , cp off
>/etc/sysconfig/network-scripts/ifcfg-eth to /target/root/ifcfg-eth0
IIUC "early-commands" are shell commands? If so, then just use the
shell command "if" ("test").
[rocketmouse at archlinux ~]$ test -e /dev/sdz1; echo $?
1
[rocketmouse at archlinux ~]$ test -e /dev/sda1; echo $?
0
[rocketmouse at archlinux ~]$ if [ -e /dev/sdz1 ]; then echo "mount && cp"; fi
[rocketmouse at archlinux ~]$ if [ -e /dev/sda1 ]; then echo "mount && cp"; fi
mount && cp
[rocketmouse at archlinux ~]$
More information about the ubuntu-users
mailing list