#!/bin/sh # # 2009 Nico Schottelius (nico-cinit at schottelius.org) # # This file is part of cinit. # # cinit is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # cinit is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with cinit. If not, see . # # # Filesystemcheck # Warning: Ubuntu has UUIDs: # root@ubuntu:~# cat /etc/fstab # /etc/fstab: static file system information. # # Use 'vol_id --uuid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # [...] # UUID=405998e4-63ba-4190-8a69-488bd81b9d39 / ext3 relatime,errors=remount-ro 0 1 # # But the mtab of the running system contains the useful entry # set -e . "$(dirname $0)/cinit-conf.read-conf" if [ $# -ne 2 ]; then echo "$(basename $0): servicename device" exit 1 fi SVC="$1"; shift DEVICE="$1"; shift BINARY_PATH="$(which fsck)" cinit-conf.svc-create.template "${SVC}" cinit-conf.svc-on "${SVC}" "${BINARY_PATH}" cinit-conf.svc-param.add "${SVC}" "${C_ON}" "${DEVICE}"