summaryrefslogtreecommitdiff
path: root/archiso/mkarchiso
diff options
context:
space:
mode:
authorSven-Hendrik Haase <sh@lutzhaase.com>2009-10-22 11:21:16 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-11-23 12:51:13 -0800
commit961d4cb670992437f1e118caea349a735c972f9f (patch)
treeecd61a85c5812797bccdb4f00d77191705fd3b83 /archiso/mkarchiso
parent44550defdb2d271e0b6eb3fff61af6980a553dfe (diff)
mkarchiso: cleanup opts, user dir creation
As in title, this patch cleans up opt flags that exist for no reason and adds additional flags to modify the disk meta info which would otherwise be hardcoded. I wasn't quite sure about the user directory part but it doesn't seem like a good idea to put that part into the script and therefore I commented it out. It would probably interfere with rc.local scripts that take care of skel copying. I replaced the part after the TODO with a safe guard to make sure that people who are not aware of the changes will not be caught by surprise. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'archiso/mkarchiso')
-rwxr-xr-xarchiso/mkarchiso32
1 files changed, 23 insertions, 9 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 1a7dea7..f4e8207 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -4,6 +4,10 @@ PKGLIST=""
QUIET="y"
FORCE="n"
PACCONFIG="/etc/pacman.conf"
+export LABEL="ARCHISO_$(pwgen -n 8 1 | tr [a-z] [A-Z])"
+PUBLISHER="Arch Linux <http://www.archlinux.org>"
+APPLICATION="Arch Linux Live/Rescue CD"
+CREATE_DEFAULT="n"
APPNAME=$(basename "${0}")
@@ -15,8 +19,12 @@ usage ()
echo " -f Force overwrite of working files/squashfs image/bootable image"
echo " -p PACKAGE(S) Additional package(s) to install, can be used multiple times"
echo " -C <file> Config file for pacman. Default $PACCONFIG"
- echo " -v Enable verbose output."
- echo " -h This message."
+ echo " -L <label> Set a label for the disk"
+ echo " -P <publisher> Set a publisher for the disk"
+ echo " -A <application> Set an application name for the disk"
+ echo " -d Create default user directory /home/arch"
+ echo " -v Enable verbose output"
+ echo " -h This message"
echo " commands:"
echo " create <dir>"
echo " create a base directory layout to work with"
@@ -28,10 +36,14 @@ usage ()
exit $1
}
-while getopts 'C:i:P:p:a:t:fvh' arg; do
+while getopts 'p:C:L:P:A:dfvh' arg; do
case "${arg}" in
p) PKGLIST="${PKGLIST} ${OPTARG}" ;;
C) PACCONFIG="${OPTARG}" ;;
+ L) LABEL="${OPTARG}" ;;
+ P) PUBLISHER="${OPTARG}" ;;
+ A) APPLICATION="${OPTARG}" ;;
+ d) CREATE_DEFAULT="y" ;;
f) FORCE="y" ;;
v) QUIET="n" ;;
h|?) usage 0 ;;
@@ -134,9 +146,11 @@ to the iso/ directory.
fi
#TODO is this needed? do it at the Makefile level?
- if [ -d "${work_dir}/root-image/home/" ]; then
- echo "Creating default home directory"
- install -d -o1000 -g100 -m0755 "${work_dir}/root-image/home/arch"
+ if [ ${CREATE_DEFAULT} == "y" ]; then
+ if [ -d "${work_dir}/root-image/home/" ]; then
+ echo "Creating default home directory"
+ install -d -o1000 -g100 -m0755 "${work_dir}/root-image/home/arch"
+ fi
fi
# delete a lot of unnecessary cache/log files
@@ -215,7 +229,6 @@ _imgcommon () {
cp "${work_dir}/isomounts" "${work_dir}/iso/"
- export LABEL="ARCHISO_$(pwgen -n 8 1 | tr [a-z] [A-Z])"
[ -f ${work_dir}/iso/boot/grub/menu.lst ] && sed "s|archisolabel=[^ ]*|archisolabel=${LABEL}|" -i ${work_dir}/iso/boot/grub/menu.lst
[ -f ${work_dir}/iso/boot/isolinux/isolinux.cfg ] && sed "s|archisolabel=[^ ]*|archisolabel=${LABEL}|" -i ${work_dir}/iso/boot/isolinux/isolinux.cfg
}
@@ -251,10 +264,11 @@ command_iso () {
qflag=""
[ "${QUIET}" = "y" ] && qflag="-quiet"
mkisofs ${qflag} -r -l $bootflags -uid 0 -gid 0 \
+ -udf -allow-limited-size -iso-level 3 \
-input-charset utf-8 -p "prepared by mkarchiso" \
-no-emul-boot -boot-load-size 4 -boot-info-table \
- -publisher "Arch Linux <http://www.archlinux.org>" \
- -A "Arch Linux Live/Rescue CD" \
+ -publisher "${PUBLISHER}" \
+ -A "${APPLICATION}" \
-V "${LABEL}" \
-o "${imgname}" "${work_dir}/iso/"
}