Bug 797427

Summary: autofs package script is broken
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ikent
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-26 22:12:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michal Jaegermann 2012-02-25 19:13:07 UTC
Description of problem:

Postinstall autofs package script looks like this -

/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -eq 1 ]; then
	/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
	# autofs has been approved to be enabled by default
	/usr/bin/systemctl enable autofs.service >/dev/null 2>&1 || :

and that is it, i.e. a missing closing "fi".  Quite unsurprisingly this results in something like that when installing/upgrading:

/var/tmp/rpm-tmp.qaUH8G: line 6: syntax error: unexpected end of file
warning: %post(autofs-1:5.0.6-12.fc18.x86_64) scriptlet failed, exit status 2

with a net effect:

# /usr/bin/systemctl status autofs.service
autofs.service - Automounts filesystems on demand
	  Loaded: loaded (/usr/lib/systemd/system/autofs.service; disabled)
	  Active: inactive (dead)
	  CGroup: name=systemd:/system/autofs.service

Maybe this is really the same as bug 768655 which already lingers for quite a while?

Version-Release number of selected component (if applicable):
autofs-5.0.6-12.fc18

How reproducible:
always on an update